Showing 685 of 1,401 total issues
Function sources
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sources(state = DEFAULT_SOURCES, action) {
switch (action.type) {
/*
* Adding new sources
*/
Function yulWalk
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function* yulWalk(
sourceId,
sourceIndex,
node,
pointer,
Function startDebugger
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
async startDebugger(compilations) {
const startMessage = DebugUtils.formatStartMessage(
this.txHash !== undefined
);
const specifiedRegistry = this.config.noEns ? null : this.config.registry; //specified at the command line
Function forAddress
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public async forAddress(
address: string,
block: Codec.BlockSpecifier = "latest"
): Promise<ContractInstanceEncoder> {
//code duplication warning: this method is basically copypasted
Function resolve
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
async resolve(
importPath: string,
importedFrom: string = "",
options: { compiler?: { name: string; version: string } } = {}
) {
Function parseImports
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
parseImports(body, solc) {
// WARNING: Kind of a hack (an expedient one).
// So we don't have to maintain a separate parser, we'll get all the imports
// in a file by sending the file to solc and evaluating the error messages
Function forContract
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function forContract(contract: CompiledContract): any {
const {
contractName,
sourcePath,
source,
Function inspectTransaction
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function* inspectTransaction(txHash) {
debug("putting");
yield put(actions.inspect(txHash));
debug("waiting");
Function processTrace
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function* processTrace(steps) {
yield put(actions.saveSteps(steps));
let callAddresses = new Set();
let selfDestructAddresses = new Set();
Function send
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
send: function (fn, methodABI, address) {
const constructor = this;
const web3 = constructor.web3;
return function () {
Function event
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
event: function (fn) {
const constructor = this;
const decode = utils.decodeLogs;
let currentLogID = null;
Function RPCs
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function RPCs(): JSX.Element {
const { state } = useDash()!;
const { classes } = useStyles();
const content = Array.from(
Function _decode
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
_decode: function (rawData, web3) {
const errorStringHash = "0x08c379a0";
const panicCodeHash = "0x4e487b71";
const selectorLength = 2 + 2 * 4; //0x then 4 bytes (0x then 8 hex digits)
const wordLength = 2 * 32; //32 bytes (64 hex digits)
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
compile: async function (options, callback) {
const callbackPassed = typeof callback === "function";
try {
const config = prepareConfig(options);
- 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 decodeTransactionBySelector
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private async decodeTransactionBySelector(
transaction: DecoderTypes.Transaction,
data: Uint8Array, //this is redundant but included for convenience
additionalContexts: Contexts.Contexts,
context: Contexts.Context | 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 decodeTransactionWithAdditionalContexts
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public async decodeTransactionWithAdditionalContexts(
transaction: DecoderTypes.Transaction,
additionalContexts: Contexts.Contexts = {},
additionalAllocations?: {
[
- 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 preserve
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export async function* preserve(
options: PreserveOptions
): AsyncIterable<Event> {
const { request, recipes } = options;
const { recipe } = request;
- 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 parseImports
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
parseImports(body, solc) {
// WARNING: Kind of a hack (an expedient one).
// So we don't have to maintain a separate parser, we'll get all the imports
// in a file by sending the file to solc and evaluating the error messages
- 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 readAndParseArtifactFiles
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function readAndParseArtifactFiles(
paths: string[],
contracts_build_directory: string
): SourceFilesArtifacts {
const sourceFilesArtifacts: SourceFilesArtifacts = {};
- 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 method
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
var method = function (constant, web3Method) {
var fn;
constant
? (fn = execute.call.call(