Skip to content

Commit

Permalink
fix(deploy): include deployed bytecode to artifact (#571)
Browse files Browse the repository at this point in the history
* fix(deploy): include deployed bytecode to artifact

* test(deploy): add test for extractArtifact
  • Loading branch information
shahnami authored Sep 27, 2024
1 parent 08b786a commit 11dfcb0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/deploy/src/models/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ export type ContractArtifact = {
object: string;
linkReferences: any;
};
deployedBytecode: {
object: string;
linkReferences: any;
};
};
metadata: string;
};
Expand Down
5 changes: 5 additions & 0 deletions packages/deploy/src/utils/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ describe('Deploy utilities', () => {
object: artifact.output.contracts['contracts/Box.sol'].Box.evm.bytecode.object,
linkReferences: artifact.output.contracts['contracts/Box.sol'].Box.evm.bytecode.linkReferences,
},
deployedBytecode: {
object: artifact.output.contracts['contracts/Box.sol'].Box.evm.deployedBytecode.object,
linkReferences:
artifact.output.contracts['contracts/Box.sol'].Box.evm.deployedBytecode.linkReferences,
},
},
metadata: artifact.output.contracts['contracts/Box.sol'].Box.metadata,
},
Expand Down
4 changes: 4 additions & 0 deletions packages/deploy/src/utils/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export function extractArtifact({
object: contract.evm.bytecode.object,
linkReferences: contract.evm.bytecode.linkReferences,
},
deployedBytecode: {
object: contract.evm.deployedBytecode.object,
linkReferences: contract.evm.deployedBytecode.linkReferences,
},
},
metadata: contract.metadata,
},
Expand Down

0 comments on commit 11dfcb0

Please sign in to comment.