Skip to content

Commit

Permalink
add deployZkLinkTokenTarget
Browse files Browse the repository at this point in the history
  • Loading branch information
zkbenny committed Jun 27, 2024
1 parent cfc72c7 commit bdd4f72
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions script/deploy_zklink_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,24 @@ task('deployZkLinkToken', 'Deploy zkLink token')
fs.writeFileSync(deployLogPath, JSON.stringify(deployLog, null, 2));
}
});

task('deployZkLinkTokenTarget', 'Deploy zkLink token target')
.addOptionalParam('skipVerify', 'Skip verify', false, types.boolean)
.setAction(async (taskArgs, hardhat) => {
let skipVerify = taskArgs.skipVerify;
console.log('skip verify contracts?', skipVerify);

const contractDeployer = new ChainContractDeployer(hardhat);
await contractDeployer.init();

// deploy zkLink token target
console.log('deploy zkLink token target...');
const contract = await contractDeployer.deployContract('ZkLinkToken', [], []);
const zkLinkTokenTargetAddr = await contract.getAddress();
console.log('zkLinkTokenTarget', zkLinkTokenTargetAddr);

// verify target contract
if (!skipVerify) {
await verifyContractCode(hardhat, zkLinkTokenTargetAddr, []);
}
});

0 comments on commit bdd4f72

Please sign in to comment.