Skip to content

Commit b504261

Browse files
authored
Merge pull request #478 from prettier-solidity/auxdata-fix
Ignore auxdata at compile time
2 parents ae30179 + 367b628 commit b504261

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests_config/utils/compile-contract.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ function compileContract(filename, content) {
99
}
1010
},
1111
settings: {
12+
metadata: { bytecodeHash: 'none' },
1213
outputSelection: {
1314
'*': {
1415
'*': ['*']
@@ -26,13 +27,8 @@ function compileContract(filename, content) {
2627
const compiledContracts = output.contracts[filename];
2728
const bytecodes = {};
2829
Object.keys(compiledContracts).forEach((contractName) => {
29-
const contract = compiledContracts[contractName].evm;
30-
const bytecode = contract.bytecode.object;
31-
bytecodes[contractName] = bytecode.substring(
32-
0,
33-
// We have to remove the auxdata at the end of the compiled bytecode.
34-
bytecode.lastIndexOf(contract.legacyAssembly['.data']['0']['.auxdata'])
35-
);
30+
bytecodes[contractName] =
31+
compiledContracts[contractName].evm.bytecode.object;
3632
});
3733
return bytecodes;
3834
}

0 commit comments

Comments
 (0)