Skip to content

Commit

Permalink
revert script
Browse files Browse the repository at this point in the history
Signed-off-by: yoshidan <[email protected]>
  • Loading branch information
yoshidan committed Sep 19, 2024
1 parent fe2c531 commit 3bdee9b
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions tests/e2e/chains/bsc/contracts/scripts/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,16 @@ async function deployApp(deployer, ibcHandler) {
const proxyV1 = await deployProxy(deployer, "AppV1", [ibcHandler.target], unsafeAllow, "__AppV1_init(string)", ["mockapp-1"]);
saveAddress("AppV1", proxyV1);

if (process.env.USE_UPGRADE_TEST === 'yes') {
for (let i = 2; i <= 7; i++) {
const contractName = `AppV${i}`;
const impl = await prepareImplementation(deployer, proxyV1, contractName, [ibcHandler.target], unsafeAllow);
saveAddress(contractName, impl);

await proxyV1.proposeAppVersion(`mockapp-${i}`, {
implementation: impl.target,
initialCalldata: impl.interface.encodeFunctionData(`__${contractName}_init(string)`, [contractName]),
consumed: false,
}).then(tx => tx.wait());
}
} else {
console.log(`You are skipping deployment of AppV2 to AppV7 since USE_UPGRADE_TEST=${process.env.USE_UPGRADE_TEST}`);
for (let i = 2; i <= 7; i++) {
const contractName = `AppV${i}`;
const impl = await prepareImplementation(deployer, proxyV1, contractName, [ibcHandler.target], unsafeAllow);
saveAddress(contractName, impl);

await proxyV1.proposeAppVersion(`mockapp-${i}`, {
implementation: impl.target,
initialCalldata: impl.interface.encodeFunctionData(`__${contractName}_init(string)`, [contractName]),
consumed: false,
}).then(tx => tx.wait());
}

return proxyV1;
Expand Down

0 comments on commit 3bdee9b

Please sign in to comment.