@0x:contracts-exchange
Addressed review feedback
This commit is contained in:
8
contracts/test-utils/src/codesize.ts
Normal file
8
contracts/test-utils/src/codesize.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { ContractArtifact } from 'ethereum-types';
|
||||
|
||||
/**
|
||||
* Get the codesize of a provided artifact.
|
||||
*/
|
||||
export function getCodesizeFromArtifact(artifact: ContractArtifact): number {
|
||||
return (artifact.compilerOutput.evm.bytecode.object.length - 2) / 2;
|
||||
}
|
Reference in New Issue
Block a user