From 9afb00dce24e29832ec6bb335ecdd5e97e63061b Mon Sep 17 00:00:00 2001 From: Sergiy Lavrynenko Date: Mon, 15 Jan 2024 12:51:26 +0000 Subject: [PATCH] hot-fix for PY-tests, fixes gas estimation problem on TokenManagerERC20 contract deployment in tests --- proxy/migrations/deploySchain.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/proxy/migrations/deploySchain.ts b/proxy/migrations/deploySchain.ts index 0fd0a32fa..e9066244d 100644 --- a/proxy/migrations/deploySchain.ts +++ b/proxy/migrations/deploySchain.ts @@ -181,19 +181,6 @@ async function main() { deployed.set( "TokenManagerEth", { address: tokenManagerEth.address, interface: tokenManagerEth.interface } ); console.log("Contract TokenManagerEth deployed to", tokenManagerEth.address); - console.log("Deploy TokenManagerERC20"); - const tokenManagerERC20Factory = await ethers.getContractFactory("TokenManagerERC20"); - const tokenManagerERC20 = await upgrades.deployProxy(tokenManagerERC20Factory, [ - schainName, - messageProxy.address, - tokenManagerLinker.address, - communityLocker.address, - depositBoxERC20Address - ]) as TokenManagerERC20; - await tokenManagerERC20.deployTransaction.wait(); - deployed.set( "TokenManagerERC20", { address: tokenManagerERC20.address, interface: tokenManagerERC20.interface } ); - console.log("Contract TokenManagerERC20 deployed to", tokenManagerERC20.address); - /* In the moment of this code was written ganache had a bug @@ -222,6 +209,19 @@ async function main() { return ethers.BigNumber.from(network.config.gas as number); } + console.log("Deploy TokenManagerERC20"); + const tokenManagerERC20Factory = await ethers.getContractFactory("TokenManagerERC20", signerWithFixedGasEstimation); + const tokenManagerERC20 = await upgrades.deployProxy(tokenManagerERC20Factory, [ + schainName, + messageProxy.address, + tokenManagerLinker.address, + communityLocker.address, + depositBoxERC20Address + ]) as TokenManagerERC20; + await tokenManagerERC20.deployTransaction.wait(); + deployed.set( "TokenManagerERC20", { address: tokenManagerERC20.address, interface: tokenManagerERC20.interface } ); + console.log("Contract TokenManagerERC20 deployed to", tokenManagerERC20.address); + // The end of TODO: console.log("Deploy TokenManagerERC721");