Skip to content

Commit 6190635

Browse files
committed
fix: include bytecode and args in deployment saving process
1 parent 5ef06ce commit 6190635

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

scripts/boost/0_deploy-modules.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const genericFactoryAddress = require('@amxx/factory/deployments/GenericFactory.
4242
await deployments.save(module.name, {
4343
abi: [],
4444
address: moduleAddress,
45+
bytecode: module.bytecode,
4546
});
4647
}
4748
})();

utils/deploy-tools.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,19 @@ export async function deploy(
1919
constructorArgs?: any[],
2020
opts?: { quiet: boolean },
2121
) {
22+
const args = constructorArgs ?? [];
2223
const contractInstance = await contractFactory
2324
.connect(deployer)
24-
.deploy(...(constructorArgs ?? []))
25+
.deploy(...args)
2526
.then((x) => x.waitForDeployment());
2627
const contractName = getBaseNameFromContractFactory(contractFactory);
2728
const contractAddress = await contractInstance.getAddress();
2829
await deployments.save(contractName, {
2930
abi: (contractFactory as any).constructor.abi,
3031
address: contractAddress,
32+
args: args,
33+
bytecode: contractFactory.bytecode,
34+
deployedBytecode: (await contractFactory.getDeployTransaction(...args)).data,
3135
});
3236
if (!opts || (opts && !opts.quiet)) {
3337
console.log(`${contractName}: ${contractAddress}`);

0 commit comments

Comments
 (0)