diff --git a/contracts/Distributor.sol b/contracts/Distributor.sol index 1599e54..876c87f 100644 --- a/contracts/Distributor.sol +++ b/contracts/Distributor.sol @@ -58,7 +58,7 @@ struct Claim { } /// @title Distributor -/// @notice Allows LPs on AMMs with concentrated liquidity to claim the rewards that were distributed to them +/// @notice Allows to claim rewards distributed to them through Merkl /// @author Angle Labs. Inc contract Distributor is UUPSHelper { using SafeERC20 for IERC20; diff --git a/contracts/deprecated/OldDistributor.sol b/contracts/deprecated/OldDistributor.sol index 1bd2a9b..9afff90 100644 --- a/contracts/deprecated/OldDistributor.sol +++ b/contracts/deprecated/OldDistributor.sol @@ -60,7 +60,7 @@ struct Claim { /// @title Distributor /// @notice Allows LPs on AMMs with concentrated liquidity to claim the rewards that were distributed to them /// @author Angle Labs. Inc -contract Distributor is UUPSHelper { +contract OldDistributor is UUPSHelper { using SafeERC20 for IERC20; /// @notice Epoch duration diff --git a/hardhat.config.ts b/hardhat.config.ts index b9b1e8a..85f4b6f 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -88,11 +88,9 @@ const config: HardhatUserConfig = { hardfork: 'london', forking: { enabled: argv.fork || false, - /* // Mainnet url: nodeUrl('fork'), - blockNumber: 16671190, - */ + blockNumber: 19127150, // Polygon /* url: nodeUrl('forkpolygon'), @@ -116,8 +114,10 @@ const config: HardhatUserConfig = { url: nodeUrl('polygonzkevm'), blockNumber: 3214816, */ + /* url: nodeUrl('linea'), - // blockNumber: 14188687, + blockNumber: 14188687, + */ }, mining: argv.disableAutoMining ? { diff --git a/scripts/mainnet-fork/upgradeDistributionCreator.ts b/scripts/mainnet-fork/upgradeDistributionCreator.ts index 61864dc..58f2469 100644 --- a/scripts/mainnet-fork/upgradeDistributionCreator.ts +++ b/scripts/mainnet-fork/upgradeDistributionCreator.ts @@ -6,12 +6,9 @@ import { deployUpgradeableUUPS, increaseTime, ZERO_ADDRESS } from '../../test/ha import { DistributionCreator, DistributionCreator__factory, + Distributor, + Distributor__factory, ERC20, - ERC20__factory, - MockMerklGaugeMiddleman, - MockMerklGaugeMiddleman__factory, - ProxyAdmin, - ProxyAdmin__factory, } from '../../typechain'; import { formatAmount, parseAmount } from '../../utils/bignumber'; @@ -19,8 +16,7 @@ const argv = yargs.env('').boolean('ci').parseSync(); async function main() { let manager: DistributionCreator; - let middleman: MockMerklGaugeMiddleman; - let angle: ERC20; + let distributor: Distributor; let params: any; const { deploy } = deployments; @@ -35,30 +31,37 @@ async function main() { await network.provider.send('hardhat_setBalance', [governor, '0x10000000000000000000000000000']); const governorSigner = await ethers.provider.getSigner(governor); - const distributorAddress = registry(ChainId.MAINNET)?.Merkl?.DistributionCreator!; + const distributionAddress = registry(ChainId.MAINNET)?.Merkl?.DistributionCreator!; + const distributorAddress = registry(ChainId.MAINNET)?.Merkl?.Distributor!; manager = new ethers.Contract( - distributorAddress, + distributionAddress, DistributionCreator__factory.createInterface(), governorSigner, ) as DistributionCreator; + distributor = new ethers.Contract( + distributorAddress, + Distributor__factory.createInterface(), + governorSigner, + ) as Distributor; + const newImplementation = await new DistributionCreator__factory(deployer).deploy(); await manager.connect(governorSigner).upgradeTo(newImplementation.address); console.log(await manager.core()); console.log(await manager.distributor()); console.log(await manager.feeRecipient()); - console.log(await manager.defaultFees()); + console.log((await manager.defaultFees()).toString()); console.log(await manager.message()); console.log(await manager.distributionList(10)); - console.log(await manager.feeRebate(governor)); - console.log(await manager.isWhitelistedToken(registry(ChainId.MAINNET)?.agEUR?.AgToken!)); - console.log(await manager._nonces('0xfda462548ce04282f4b6d6619823a7c64fdc0185')); - console.log(await manager.userSignatureWhitelist('0xfda462548ce04282f4b6d6619823a7c64fdc0185')); + console.log((await manager.feeRebate(governor)).toString()); + console.log((await manager.isWhitelistedToken(registry(ChainId.MAINNET)?.agEUR?.AgToken!)).toString()); + console.log((await manager._nonces('0xfda462548ce04282f4b6d6619823a7c64fdc0185')).toString()); + console.log((await manager.userSignatureWhitelist('0xfda462548ce04282f4b6d6619823a7c64fdc0185')).toString()); console.log(await manager.rewardTokens(0)); - console.log(await manager.campaignList(0)); - console.log(await manager.campaignSpecificFees(0)); + // console.log(await manager.campaignList(0)); + console.log((await manager.campaignSpecificFees(0)).toString()); } main().catch(error => {