@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;
|
||||
}
|
@@ -48,3 +48,4 @@ export {
|
||||
} from './types';
|
||||
export { blockchainTests, BlockchainTestsEnvironment, describe } from './mocha_blockchain';
|
||||
export { chaiSetup, expect } from './chai_setup';
|
||||
export { getCodesizeFromArtifact } from './codesize';
|
||||
|
Reference in New Issue
Block a user