9 lines
257 B
TypeScript
9 lines
257 B
TypeScript
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;
|
|
}
|