From 51d57d3eca823aa2f7184888c4a6848d4fdf3881 Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Mon, 7 Oct 2024 15:49:45 +0300 Subject: [PATCH] fix carbon vortex deployment tests --- deploy/tests/mainnet/0004-fee-burner.ts | 3 ++- deploy/tests/mainnet/0006-carbon-vortex-upgrade.ts | 3 ++- deploy/tests/mainnet/0012-carbon-vortex-upgrade.ts | 3 ++- deploy/tests/mainnet/0016-carbon-vortex-upgrade.ts | 3 ++- deploy/tests/mainnet/0017-carbon-vortex-upgrade.ts | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/deploy/tests/mainnet/0004-fee-burner.ts b/deploy/tests/mainnet/0004-fee-burner.ts index 52be1525..d4856031 100644 --- a/deploy/tests/mainnet/0004-fee-burner.ts +++ b/deploy/tests/mainnet/0004-fee-burner.ts @@ -1,5 +1,6 @@ import { CarbonController, CarbonVortex, ProxyAdmin } from '../../../components/Contracts'; import { DeployedContracts, describeDeployment } from '../../../utils/Deploy'; +import { ZERO_ADDRESS } from '../../../utils/Constants'; import { expect } from 'chai'; import { ethers } from 'hardhat'; @@ -33,7 +34,7 @@ describeDeployment(__filename, () => { const implementationAddress = await proxyAdmin.getProxyImplementation(carbonVortex.address); const carbonVortexImpl: CarbonVortex = await ethers.getContractAt('CarbonVortex', implementationAddress); // hardcoding gas limit to avoid gas estimation attempts (which get rejected instead of reverted) - const tx = await carbonVortexImpl.initialize({ gasLimit: 6000000 }); + const tx = await carbonVortexImpl.initialize(ZERO_ADDRESS, { gasLimit: 6000000 }); await expect(tx.wait()).to.be.reverted; }); }); diff --git a/deploy/tests/mainnet/0006-carbon-vortex-upgrade.ts b/deploy/tests/mainnet/0006-carbon-vortex-upgrade.ts index 420e6b9f..213cf39c 100644 --- a/deploy/tests/mainnet/0006-carbon-vortex-upgrade.ts +++ b/deploy/tests/mainnet/0006-carbon-vortex-upgrade.ts @@ -1,3 +1,4 @@ +import { ZERO_ADDRESS } from '../../../utils/Constants'; import { CarbonController, CarbonVortex, ProxyAdmin } from '../../../components/Contracts'; import { DeployedContracts, describeDeployment } from '../../../utils/Deploy'; import { expect } from 'chai'; @@ -38,7 +39,7 @@ describeDeployment(__filename, () => { const implementationAddress = await proxyAdmin.getProxyImplementation(carbonVortex.address); const carbonVortexImpl: CarbonVortex = await ethers.getContractAt('CarbonVortex', implementationAddress); // hardcoding gas limit to avoid gas estimation attempts (which get rejected instead of reverted) - const tx = await carbonVortexImpl.initialize({ gasLimit: 6000000 }); + const tx = await carbonVortexImpl.initialize(ZERO_ADDRESS, { gasLimit: 6000000 }); await expect(tx.wait()).to.be.reverted; }); }); diff --git a/deploy/tests/mainnet/0012-carbon-vortex-upgrade.ts b/deploy/tests/mainnet/0012-carbon-vortex-upgrade.ts index 5628355f..0141ff9e 100644 --- a/deploy/tests/mainnet/0012-carbon-vortex-upgrade.ts +++ b/deploy/tests/mainnet/0012-carbon-vortex-upgrade.ts @@ -1,5 +1,6 @@ import { CarbonController, CarbonVortex, ProxyAdmin } from '../../../components/Contracts'; import { DeployedContracts, describeDeployment } from '../../../utils/Deploy'; +import { ZERO_ADDRESS } from '../../../utils/Constants'; import { expect } from 'chai'; import { ethers } from 'hardhat'; @@ -38,7 +39,7 @@ describeDeployment(__filename, () => { const implementationAddress = await proxyAdmin.getProxyImplementation(carbonVortex.address); const carbonVortexImpl: CarbonVortex = await ethers.getContractAt('CarbonVortex', implementationAddress); // hardcoding gas limit to avoid gas estimation attempts (which get rejected instead of reverted) - const tx = await carbonVortexImpl.initialize({ gasLimit: 6000000 }); + const tx = await carbonVortexImpl.initialize(ZERO_ADDRESS, { gasLimit: 6000000 }); await expect(tx.wait()).to.be.reverted; }); }); diff --git a/deploy/tests/mainnet/0016-carbon-vortex-upgrade.ts b/deploy/tests/mainnet/0016-carbon-vortex-upgrade.ts index 10e0c72b..8b446917 100644 --- a/deploy/tests/mainnet/0016-carbon-vortex-upgrade.ts +++ b/deploy/tests/mainnet/0016-carbon-vortex-upgrade.ts @@ -1,5 +1,6 @@ import { CarbonVortex, ProxyAdmin } from '../../../components/Contracts'; import { DeployedContracts, describeDeployment } from '../../../utils/Deploy'; +import { ZERO_ADDRESS } from '../../../utils/Constants'; import { expect } from 'chai'; import { ethers } from 'hardhat'; @@ -21,7 +22,7 @@ describeDeployment(__filename, () => { const implementationAddress = await proxyAdmin.getProxyImplementation(carbonVortex.address); const carbonControllerImpl: CarbonVortex = await ethers.getContractAt('CarbonVortex', implementationAddress); // hardcoding gas limit to avoid gas estimation attempts (which get rejected instead of reverted) - const tx = await carbonControllerImpl.initialize({ gasLimit: 6000000 }); + const tx = await carbonControllerImpl.initialize(ZERO_ADDRESS, { gasLimit: 6000000 }); await expect(tx.wait()).to.be.reverted; }); diff --git a/deploy/tests/mainnet/0017-carbon-vortex-upgrade.ts b/deploy/tests/mainnet/0017-carbon-vortex-upgrade.ts index 8868b5ed..be2d5ae2 100644 --- a/deploy/tests/mainnet/0017-carbon-vortex-upgrade.ts +++ b/deploy/tests/mainnet/0017-carbon-vortex-upgrade.ts @@ -1,5 +1,6 @@ import { CarbonVortex, ProxyAdmin } from '../../../components/Contracts'; import { DeployedContracts, describeDeployment } from '../../../utils/Deploy'; +import { ZERO_ADDRESS } from '../../../utils/Constants'; import { expect } from 'chai'; import { ethers } from 'hardhat'; @@ -21,7 +22,7 @@ describeDeployment(__filename, () => { const implementationAddress = await proxyAdmin.getProxyImplementation(carbonVortex.address); const carbonControllerImpl: CarbonVortex = await ethers.getContractAt('CarbonVortex', implementationAddress); // hardcoding gas limit to avoid gas estimation attempts (which get rejected instead of reverted) - const tx = await carbonControllerImpl.initialize({ gasLimit: 6000000 }); + const tx = await carbonControllerImpl.initialize(ZERO_ADDRESS, { gasLimit: 6000000 }); await expect(tx.wait()).to.be.reverted; });