From 40b1c59873dbbc14698f66e120b1c6ced1be048a Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Thu, 12 Sep 2024 14:00:29 +0300 Subject: [PATCH] add vortex description --- contracts/vortex/CarbonVortex.sol | 10 ++++++++++ deploy/tests/mainnet/0016-carbon-vortex-upgrade.ts | 7 ++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/contracts/vortex/CarbonVortex.sol b/contracts/vortex/CarbonVortex.sol index b091d29..2f70902 100644 --- a/contracts/vortex/CarbonVortex.sol +++ b/contracts/vortex/CarbonVortex.sol @@ -19,6 +19,16 @@ import { PPM_RESOLUTION, MAX_GAP } from "../utility/Constants.sol"; /** * @notice CarbonVortex contract + * + * @dev + * + * collects fees and allows users to trade tokens in a dutch auction style + * configurable parameters include the target token, final target token and the halflife + * auctions are initiated by calling the execute function + * all auctions start with an initial price of 2^128 - 1 + * half-life parameter sets the price decay rate - + * - this is the time in seconds it takes for the price to halve + * - this parameter can be configured so that tokens reach the market rate faster or slower */ contract CarbonVortex is ICarbonVortex, Upgradeable, ReentrancyGuardUpgradeable, Utils { using Address for address payable; diff --git a/deploy/tests/mainnet/0016-carbon-vortex-upgrade.ts b/deploy/tests/mainnet/0016-carbon-vortex-upgrade.ts index 603b055..10e0c72 100644 --- a/deploy/tests/mainnet/0016-carbon-vortex-upgrade.ts +++ b/deploy/tests/mainnet/0016-carbon-vortex-upgrade.ts @@ -19,10 +19,7 @@ describeDeployment(__filename, () => { it('carbon vortex implementation should be initialized', async () => { const implementationAddress = await proxyAdmin.getProxyImplementation(carbonVortex.address); - const carbonControllerImpl: CarbonVortex = await ethers.getContractAt( - 'CarbonVortex', - implementationAddress - ); + 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 }); await expect(tx.wait()).to.be.reverted; @@ -30,7 +27,7 @@ describeDeployment(__filename, () => { it('cannot call postUpgrade on carbon vortex', async () => { // hardcoding gas limit to avoid gas estimation attempts (which get rejected instead of reverted) - const tx = await carbonVortex.postUpgrade(true, "0x", { gasLimit: 6000000 }); + const tx = await carbonVortex.postUpgrade(true, '0x', { gasLimit: 6000000 }); await expect(tx.wait()).to.be.reverted; }); });