File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff 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} ) ( ) ;
Original file line number Diff line number Diff 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 } ` ) ;
You can’t perform that action at this time.
0 commit comments