diff options
author | Fabio Berger <me@fabioberger.com> | 2018-05-23 00:25:02 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-05-23 00:25:02 +0800 |
commit | 4a0c8d72b05152ee2fd71245873d5a70f7281058 (patch) | |
tree | 2c28ad8214aaaa10913a621509d0ae4020ee4d3d /packages/sol-compiler/test | |
parent | d460c0e8b9c6f4081803fff4e2d2347be8cd5ce3 (diff) | |
parent | ab9cfd293b3ccc2aacb4238aebe2b033e55b7935 (diff) | |
download | dexon-sol-tools-4a0c8d72b05152ee2fd71245873d5a70f7281058.tar dexon-sol-tools-4a0c8d72b05152ee2fd71245873d5a70f7281058.tar.gz dexon-sol-tools-4a0c8d72b05152ee2fd71245873d5a70f7281058.tar.bz2 dexon-sol-tools-4a0c8d72b05152ee2fd71245873d5a70f7281058.tar.lz dexon-sol-tools-4a0c8d72b05152ee2fd71245873d5a70f7281058.tar.xz dexon-sol-tools-4a0c8d72b05152ee2fd71245873d5a70f7281058.tar.zst dexon-sol-tools-4a0c8d72b05152ee2fd71245873d5a70f7281058.zip |
merge development
Diffstat (limited to 'packages/sol-compiler/test')
-rw-r--r-- | packages/sol-compiler/test/compiler_test.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/sol-compiler/test/compiler_test.ts b/packages/sol-compiler/test/compiler_test.ts index dc8eb1c4e..991965caa 100644 --- a/packages/sol-compiler/test/compiler_test.ts +++ b/packages/sol-compiler/test/compiler_test.ts @@ -39,8 +39,13 @@ describe('#Compiler', function(): void { const exchangeArtifactString = await fsWrapper.readFileAsync(exchangeArtifactPath, opts); const exchangeArtifact: ContractArtifact = JSON.parse(exchangeArtifactString); // The last 43 bytes of the binaries are metadata which may not be equivalent - const unlinkedBinaryWithoutMetadata = exchangeArtifact.compilerOutput.evm.bytecode.object.slice(2, -86); - const exchangeBinaryWithoutMetadata = exchange_binary.slice(0, -86); + const metadataByteLength = 43; + const metadataHexLength = metadataByteLength * 2; + const unlinkedBinaryWithoutMetadata = exchangeArtifact.compilerOutput.evm.bytecode.object.slice( + 2, + -metadataHexLength, + ); + const exchangeBinaryWithoutMetadata = exchange_binary.slice(0, -metadataHexLength); expect(unlinkedBinaryWithoutMetadata).to.equal(exchangeBinaryWithoutMetadata); }); }); |