Showing 685 of 1,401 total issues
Function deployed
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
deployed: () => {
let stopText;
if (reporter.blockSpinner) {
reporter.blockSpinner.remove();
stopText = ` > ${reporter.currentBlockWait}`;
Function sourcesWithDependencies
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
async sourcesWithDependencies({ paths = [], options }) {
options = Config.default().merge(options);
debug("paths: %O", paths);
const vyperFilesStrict = paths.filter(path =>
minimatch(path, VYPER_PATTERN_STRICT, { dot: true })
Function compileSources
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
compileSources: async function (config, compilers) {
compilers = config.compiler
? config.compiler === "none"
? []
: [config.compiler]
Function link
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
link(name, address) {
switch (typeof name) {
case "string":
// Case: Contract.link(<libraryName>, <address>)
if (this._json.networks[this.network_id] == null) {
Function printEvents
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
printEvents() {
const instances = this.session.view(session.info.affectedInstances); //used to look
const formatAddress = address => {
const name = instances[address]?.contractName;
const colorizedAddress = colors.yellow(address); //dull yellow
Function recognizeInteger
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
private recognizeInteger(input: unknown): Codec.IntegerWrapResponse {
if (Utils.isBigNumber(input)) {
if (input.isInteger()) {
return {
kind: "integer" as const,
Function filterProjectNetworkAncestors
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function filterProjectNetworkAncestors(options: {
project: IdObject<"projects">;
network: DataModel.ResourceNameInput;
candidates: IdObject<"networks">[];
workspace: Workspace;
Function resolver
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
(sources, functions) => breakpoint => {
let adjustedBreakpoint;
if (breakpoint.node === undefined) {
let line = breakpoint.line;
if (line < 0) {
Function exports
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = async function (config) {
const debugLog = debug.extend("guard");
// only check if deploying on MAINNET
// NOTE: this includes Ethereum Classic as well as Ethereum as they're only
// distinguishable by checking their chainIds, 2 and 1 respectively.
Function recognizeAddress
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
private async recognizeAddress(
input: string
): Promise<Codec.AddressWrapResponse> {
let address: string | null = null;
try {
Function formatCalldata
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
formatCalldata: function (calldata) {
//takes a Uint8Array
let selector = calldata.slice(0, Codec.Evm.Utils.SELECTOR_SIZE);
let words = [];
for (
Function fetchTx
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function* fetchTx(txHash, loadOptions) {
let result = yield* web3.inspectTransaction(txHash);
debug("result %o", result);
if (result.error) {
Function provision
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
provision() {
let files = [];
let jsonBlobs = [];
try {
files = fse.readdirSync(this.options.contracts_build_directory);
Function withMulticallInterpretations
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
private async withMulticallInterpretations(
decoding: FunctionDecoding,
transaction: DecoderTypes.Transaction,
additionalContexts: Contexts.Contexts = {},
additionalAllocations?: {
Function connectPromise
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
(resolve, reject) => {
return {
open: () => {
debug(
"connect: %s connection succeeded to url %s",
Function codex
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function codex(state = DEFAULT_CODEX, action) {
let newState, topCodex, topCodexNoZero;
const updateFrameStorage = (frame, address, slot, value) => ({
...frame,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function setUserConfigViaPrompt
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
setUserConfigViaPrompt: async function () {
if (
!this.getUserConfig().get("analyticsSet") &&
process.stdin.isTTY === true
) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getCommand
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const getCommand = ({ inputStrings, options, noAliases }) => {
if (inputStrings.length === 0) {
return null;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function deployed
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
deployed: async function(options) {
let files;
try {
// Only read JSON files in directory
files = fs
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function compile
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
async function compile(config) {
// determine compiler(s) to use
const compilers = config.compiler
? config.compiler === "none"
? []
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"