Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
binary,
contractId,
contractKind,
isConstructor,
abi,
payable,
compiler
} = context;
return {
context: contextHash,
contractName,
binary,
contractId,
contractKind,
isConstructor,
abi: CodecUtils.AbiUtils.computeSelectors(abi),
payable,
compiler
};
}
return {
...state,
byContext: {
...state.byContext,
[context]: {
contractName,
context,
binary,
sourceMap,
primarySource,
compiler,
abi,
contractId,
contractKind,
isConstructor,
payable: CodecUtils.AbiUtils.abiHasPayableFallback(abi)
}
}
};
case actions.NORMALIZE_CONTEXTS:
return {
byContext: CodecUtils.ContextUtils.normalizeContexts(state.byContext)
};
/*
* Default case
*/
default:
return state;
}
}