@gooddollar/goodprotocol 2.1.3 → 2.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/artifacts/abis/IdentityV4.min.json +1 -0
- package/artifacts/contracts/DAOStackInterfaces.sol/Avatar.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/Controller.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/IntVoteInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/ReputationInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/SchemeRegistrar.dbg.json +1 -1
- package/artifacts/contracts/IUniswapV3.sol/INonfungiblePositionManager.dbg.json +1 -1
- package/artifacts/contracts/IUniswapV3.sol/IUniswapV3Pool.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/AggregatorV3Interface.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ERC20.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IAaveIncentivesController.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IAdminWallet.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IDonationStaking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IERC2917.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IGoodStaking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IHasRouter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IIdentity.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ILendingPool.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IMultichainRouter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/INameService.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IQuoterV2.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ISwapRouter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IUBIScheme.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ProxyAdmin.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Reserve.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Uniswap.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/UniswapFactory.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/UniswapPair.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/cERC20.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IBancorExchangeProvider.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IBroker.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IGoodDollarExchangeProvider.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IGoodDollarExpansionController.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IMentoReserve.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/ITradingLimits.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/SuperfluidFacuet.sol/SuperfluidFaucet.dbg.json +1 -1
- package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
- package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
- package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.json +2 -2
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IStakingUpgrade.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/RewardsMinter.dbg.json +1 -1
- package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/MultiBaseGovernanceShareField.sol/MultiBaseGovernanceShareField.dbg.json +1 -1
- package/artifacts/contracts/governance/Reputation.sol/Reputation.dbg.json +1 -1
- package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
- package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
- package/artifacts/contracts/identity/IdentityV3.sol/IdentityV3.dbg.json +1 -1
- package/artifacts/contracts/identity/IdentityV3.sol/IdentityV3.json +2 -2
- package/artifacts/contracts/identity/IdentityV4.sol/IdentityV4.dbg.json +4 -0
- package/artifacts/contracts/identity/IdentityV4.sol/IdentityV4.json +1162 -0
- package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +1 -1
- package/artifacts/contracts/invite/OneTimeReward.sol/OneTimeReward.dbg.json +1 -1
- package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.json +2 -2
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/GenericDistributionHelperTest.sol/GenericDistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GenericDistributionHelperTest.sol/GenericDistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.json +2 -2
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/IWrapper.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.json +2 -2
- package/artifacts/contracts/mocks/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
- package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.json +2 -2
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
- package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
- package/artifacts/contracts/reserve/CeloDistributionHelper.sol/CeloDistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/GenericDistributionHelper.sol/GenericDistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodReserveCDai.sol/ContributionCalc.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
- package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.dbg.json +1 -1
- package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.dbg.json +1 -1
- package/artifacts/contracts/staking/SimpleStaking.sol/SimpleStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/SimpleStakingV2.sol/SimpleStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.dbg.json +1 -1
- package/artifacts/contracts/staking/utils/StakingRewardsFixedAPY.sol/StakingRewardsFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.dbg.json +1 -1
- package/artifacts/contracts/token/ERC677.sol/ERC677.dbg.json +1 -1
- package/artifacts/contracts/token/ERC677.sol/ERC677Receiver.dbg.json +1 -1
- package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/GoodDollar2.sol/GoodDollar2.dbg.json +1 -1
- package/artifacts/contracts/token/IFeesFormula.sol/IFeesFormula.dbg.json +1 -1
- package/artifacts/contracts/token/MultichainFeeFormula.sol/MultichainFeeFormula.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ERC20Permit.sol/ERC20Permit.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ERC20Permit.sol/SelfApprove.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/IGoodDollarCustom.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/ISuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperToken.sol/ISuperToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperfluidToken.sol/SuperfluidToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxiable.sol/UUPSProxiable.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/Proxy.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.dbg.json +1 -1
- package/artifacts/contracts/utils/BulkProof.sol/BulkProof.dbg.json +1 -1
- package/artifacts/contracts/utils/BulkWhitelist.sol/BulkWhitelist.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyFromReserveHelper.sol/BuyFromReserveHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/DonateGDClone.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOContract.sol/DAOContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DSMath.sol/DSMath.dbg.json +1 -1
- package/artifacts/contracts/utils/DataTypes.sol/DataTypes.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/EternalStorage.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/FuseOldBridgeKill.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/IUpgradeabilityOwnerStorage.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Initializable.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Ownable.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Upgradeable.dbg.json +1 -1
- package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/IRouter.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/PausableControl.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.dbg.json +1 -1
- package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.dbg.json +1 -1
- package/artifacts/contracts/utils/LastauthReduction.sol/LastauthReduction.dbg.json +1 -1
- package/artifacts/contracts/utils/LastauthReduction.sol/LastauthReduction.json +2 -2
- package/artifacts/contracts/utils/MultiCall.sol/Multicall.dbg.json +1 -1
- package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/NameService.sol/NameService.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtoclUpgradeV4Mento.sol/MentoExchange.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtoclUpgradeV4Mento.sol/ProtocolUpgradeV4Mento.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/OldMarketMaker.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.dbg.json +1 -1
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.dbg.json +1 -1
- package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/ReserveRestore.sol/ReserveRestore.dbg.json +1 -1
- package/artifacts/contracts/utils/ReserveRestore.sol/ReserveRestore.json +2 -2
- package/contracts/identity/IdentityV3.sol +0 -3
- package/contracts/identity/IdentityV4.sol +578 -0
- package/hardhat.config.ts +3 -4
- package/package.json +8 -4
- package/test/governance/ClaimersDistribution.test.ts +1 -1
- package/test/governance/CompoundVotingMachine.castvote.test.ts +30 -30
- package/test/helpers.ts +76 -195
- package/test/identity/IdentityV3.test.ts +53 -129
- package/test/identity/IdentityV4.test.ts +454 -0
- package/test/reserve/GenericDistributionHelper.e2e.test.ts +445 -0
- package/test/utils/AdminWallet.test.ts +14 -15
- package/types/contracts/identity/IdentityV4.ts +2001 -0
- package/types/contracts/identity/index.ts +1 -0
- package/types/contracts/utils/UpdateReserveRatio.sol/MentoExchange.ts +81 -0
- package/types/contracts/utils/UpdateReserveRatio.sol/UpdateReserveRatio.ts +134 -0
- package/types/contracts/utils/UpdateReserveRatio.sol/index.ts +5 -0
- package/types/contracts/utils/UpdateReserveRatioAfterXDC.sol/UpdateReserveRatioAfterXDC.ts +7 -2
- package/types/contracts/utils/index.ts +2 -2
- package/types/factories/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking__factory.ts +1 -1
- package/types/factories/contracts/identity/IdentityV3__factory.ts +1 -1
- package/types/factories/contracts/identity/IdentityV4__factory.ts +1213 -0
- package/types/factories/contracts/identity/index.ts +1 -0
- package/types/factories/contracts/mocks/DistributionBridgeMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/GoodDollarStakingMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/StakingMockFixedAPY__factory.ts +1 -1
- package/types/factories/contracts/utils/LastauthReduction__factory.ts +1 -1
- package/types/factories/contracts/utils/ReserveRestore__factory.ts +1 -1
- package/types/factories/contracts/utils/UpdateReserveRatio.sol/MentoExchange__factory.ts +39 -0
- package/types/factories/contracts/utils/UpdateReserveRatio.sol/UpdateReserveRatio__factory.ts +113 -0
- package/types/factories/contracts/utils/UpdateReserveRatio.sol/index.ts +5 -0
- package/types/factories/contracts/utils/UpdateReserveRatioAfterXDC.sol/UpdateReserveRatioAfterXDC__factory.ts +9 -15
- package/types/factories/contracts/utils/index.ts +1 -1
- package/types/hardhat.d.ts +13 -4
- package/types/index.ts +4 -2
- package/scripts/ProxyFactory.json +0 -4425
- package/scripts/analytics/activeGDStakers.ts +0 -188
- package/scripts/analytics/activeStakers.ts +0 -25
- package/scripts/analytics/activeUsersCount.ts +0 -156
- package/scripts/analytics/activeWalletsStats.ts +0 -301
- package/scripts/analytics/checkActiveWallets.ts +0 -60
- package/scripts/analytics/checkBridgeBalances.ts +0 -442
- package/scripts/analytics/claimIncidentStats.ts +0 -98
- package/scripts/analytics/faucetStats.ts +0 -130
- package/scripts/analytics/gdinflow.ts +0 -57
- package/scripts/analytics/goodHolders.ts +0 -46
- package/scripts/analytics/goodgiveback.ts +0 -64
- package/scripts/analytics/p2pTxs.ts +0 -564
- package/scripts/analytics/stuckgd.ts +0 -70
- package/scripts/analytics/tokenInOutStats.ts +0 -48
- package/scripts/analytics/whitelistsyncIssue.ts +0 -87
- package/scripts/bulkProof.ts +0 -202
- package/scripts/bulkWhitelist.ts +0 -31
- package/scripts/deployGnosisSafe.ts +0 -111
- package/scripts/fetchOrDeployProxyFactory.ts +0 -46
- package/scripts/fv.ts +0 -263
- package/scripts/gdx/gdxAirdropCalculation.ts +0 -479
- package/scripts/getFounders.ts +0 -32
- package/scripts/governance/README.md +0 -70
- package/scripts/governance/airdropCalculation.ts +0 -1119
- package/scripts/governance/airdropCalculationRecover.ts +0 -416
- package/scripts/governance/airdropCalculationSorted.ts +0 -438
- package/scripts/governance/goodCheckpointSorted.ts +0 -300
- package/scripts/keeper/fishInactive.ts +0 -47
- package/scripts/minimize.sh +0 -17
- package/scripts/multichain-deploy/0_proxyFactory-deploy.ts +0 -131
- package/scripts/multichain-deploy/1_basicdao-deploy.ts +0 -294
- package/scripts/multichain-deploy/2_helpers-deploy.ts +0 -152
- package/scripts/multichain-deploy/2b_otp-deploy.ts +0 -73
- package/scripts/multichain-deploy/3_gdSavings-deploy.ts +0 -190
- package/scripts/multichain-deploy/4_ubi-deploy.ts +0 -129
- package/scripts/multichain-deploy/5_gov-deploy.ts +0 -179
- package/scripts/multichain-deploy/6_testnetFaucet.ts +0 -85
- package/scripts/multichain-deploy/7_superfluidfaucet-deploy.ts +0 -123
- package/scripts/multichain-deploy/8_disthelper-deploy.ts +0 -152
- package/scripts/multichain-deploy/createUniswapTestPools.ts +0 -163
- package/scripts/multichain-deploy/flattened/Avatar.sol +0 -913
- package/scripts/multichain-deploy/flattened/Controller.sol +0 -1891
- package/scripts/multichain-deploy/flattened/FeeFormula.sol +0 -1290
- package/scripts/multichain-deploy/fulldeploy.sh +0 -26
- package/scripts/multichain-deploy/helpers.ts +0 -647
- package/scripts/multichain-deploy/multichainWrapper-deploy.ts +0 -59
- package/scripts/multichain-deploy/verifyEtherscan.ts +0 -177
- package/scripts/proposals/gip-14_1.ts +0 -251
- package/scripts/proposals/gip-15.ts +0 -427
- package/scripts/proposals/gip-25-xdc-upgrade-ubi.ts +0 -746
- package/scripts/proposals/gips-14_1.md +0 -29
- package/scripts/proposals/hack-ubi-recovery.ts +0 -414
- package/scripts/proposals/identityAuthPeriod.ts +0 -229
- package/scripts/proposals/reserveRestore.ts +0 -474
- package/scripts/proposals/updateDistHelper.ts +0 -180
- package/scripts/proposals/v4Upgrade.ts +0 -845
- package/scripts/releaser.js +0 -24
- package/scripts/staking/stakersGdRewardsCalculation.ts +0 -64
- package/scripts/upgradeScheme.ts +0 -97
- package/scripts/upgradeToV2/upgradeToV2.ts +0 -853
- package/scripts/upgradeToV2/upgradeToV2Recover.ts +0 -939
- package/scripts/upgradeToV3/v3-fix.ts +0 -120
- package/scripts/upgradeToV3/v3-fuse-multichain.ts +0 -117
- package/scripts/upgradeToV3/v3-upgrade.ts +0 -219
- package/scripts/upgrades/celo-defi-ubi-deploy.ts +0 -184
- package/scripts/upgrades/identity-upgrade.ts +0 -126
- package/scripts/upgrades/multichain-formula-upgrade.ts +0 -143
- package/scripts/upgrades/multichain-temp-fix.ts +0 -129
- package/scripts/upgrades/restoreFunds.ts +0 -91
- package/scripts/upgrades/superfluid-nft-celo-gas-token.ts +0 -159
- package/scripts/upgrades/transferDaoToGuardians.ts +0 -80
- package/scripts/upgrades/upgradeAdminWallet.ts +0 -29
- package/scripts/upgrades/upgradeFaucet.ts +0 -46
- package/scripts/utils.ts +0 -50
- package/scripts/verify.ts +0 -67
- package/scripts/voltageswaps.ts +0 -46
|
@@ -1,746 +0,0 @@
|
|
|
1
|
-
// Part 1 UBI+Bridge
|
|
2
|
-
// deploy dao to xdc - Done
|
|
3
|
-
// deploy bridge to xdc - Done
|
|
4
|
-
// give minting rights to xdc bridge - done
|
|
5
|
-
// upgrade to improved identity + ubischeme on celo + fuse
|
|
6
|
-
// upgrade bridge on celo/ethereum/fuse - make sure they include xdc
|
|
7
|
-
// burn celo bridge locked supply (now each chain has its own supply and all bridges are mint/burn)
|
|
8
|
-
// add celo bridge as minter
|
|
9
|
-
|
|
10
|
-
// Part 2 Reserve
|
|
11
|
-
// create uniswap pools on xdc
|
|
12
|
-
// calculate how much G$s each reserve is backing
|
|
13
|
-
// deploy mento reserve to xdc with calculated parameters
|
|
14
|
-
// give mento broker minting rights on xdc
|
|
15
|
-
// deploy distribution helper
|
|
16
|
-
// transfer usdc to xdc reserve
|
|
17
|
-
// update celo reserve parameters accordingly
|
|
18
|
-
// upgrade celo's distribution helper to genericdistributionhelper (simulate it is working)
|
|
19
|
-
|
|
20
|
-
import { network, ethers, upgrades } from "hardhat";
|
|
21
|
-
import { reset } from "@nomicfoundation/hardhat-network-helpers";
|
|
22
|
-
import { defaultsDeep, last } from "lodash";
|
|
23
|
-
import prompt from "prompt";
|
|
24
|
-
|
|
25
|
-
import {
|
|
26
|
-
executeViaGuardian,
|
|
27
|
-
executeViaSafe,
|
|
28
|
-
verifyContract,
|
|
29
|
-
verifyProductionSigner
|
|
30
|
-
} from "../multichain-deploy/helpers";
|
|
31
|
-
|
|
32
|
-
import dao from "../../releases/deployment.json";
|
|
33
|
-
import { Controller, IdentityV3, IGoodDollar, IMessagePassingBridge, UBISchemeV2 } from "../../types";
|
|
34
|
-
import { upgrade } from "./gip-15";
|
|
35
|
-
let { name: networkName } = network;
|
|
36
|
-
const isSimulation = network.name === "hardhat" || network.name === "fork" || network.name === "localhost";
|
|
37
|
-
const bridgeUpgradeImpl = {
|
|
38
|
-
"production-celo": "0xF3eAB7018d74E7Df95A5d8dC70987C0539bDF48f",
|
|
39
|
-
production: "0xFB62aA509a7B260b6697B671C969a184d6c39E90",
|
|
40
|
-
"production-mainnet": "0x12ab702f015D3302f3cc0c4AbA0626A127D06A07",
|
|
41
|
-
"production-xdc": "0xe4CFA18A3d0a7d77fAA42961ee943c9221d61937"
|
|
42
|
-
};
|
|
43
|
-
export const upgradeCeloStep1 = async (network, checksOnly) => {
|
|
44
|
-
let [root] = await ethers.getSigners();
|
|
45
|
-
|
|
46
|
-
const isProduction = networkName.includes("production");
|
|
47
|
-
|
|
48
|
-
if (isProduction) verifyProductionSigner(root);
|
|
49
|
-
|
|
50
|
-
let networkEnv = networkName;
|
|
51
|
-
let guardian = root;
|
|
52
|
-
if (isSimulation) {
|
|
53
|
-
networkEnv = network;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
let release: { [key: string]: any } = dao[networkEnv];
|
|
57
|
-
|
|
58
|
-
console.log("signer:", root.address, { networkEnv, isSimulation, isProduction, release });
|
|
59
|
-
|
|
60
|
-
if (isSimulation) {
|
|
61
|
-
networkEnv = network;
|
|
62
|
-
guardian = await ethers.getImpersonatedSigner(release.GuardiansSafe);
|
|
63
|
-
|
|
64
|
-
await root.sendTransaction({
|
|
65
|
-
value: ethers.utils.parseEther("1"),
|
|
66
|
-
to: release.GuardiansSafe
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const ubiImpl = await ethers.deployContract("UBISchemeV2");
|
|
71
|
-
const identityImpl = await ethers.deployContract("IdentityV3");
|
|
72
|
-
const bridgeImpl = bridgeUpgradeImpl[networkEnv];
|
|
73
|
-
const upgradeCall = ethers.utils.keccak256(ethers.utils.toUtf8Bytes("upgrade()")).substring(0, 10);
|
|
74
|
-
|
|
75
|
-
// Extract the first four bytes as the function selector
|
|
76
|
-
console.log("deployed new impls", { ubiImpl: ubiImpl.address, identityImpl: identityImpl.address });
|
|
77
|
-
|
|
78
|
-
const gd = (await ethers.getContractAt("IGoodDollar", release.GoodDollar)) as IGoodDollar;
|
|
79
|
-
const avatarBalance = await gd.balanceOf(release.Avatar);
|
|
80
|
-
const bridgeBalance = await gd.balanceOf(release.MpbBridge);
|
|
81
|
-
const toBurn = avatarBalance.add(bridgeBalance);
|
|
82
|
-
|
|
83
|
-
console.log("calculated burn amount:", {
|
|
84
|
-
toBurn: toBurn.toString(),
|
|
85
|
-
avatarBalance: avatarBalance.toString(),
|
|
86
|
-
bridgeBalance: bridgeBalance.toString()
|
|
87
|
-
});
|
|
88
|
-
const proposalActions = [
|
|
89
|
-
[release.UBIScheme, "upgradeTo(address)", ethers.utils.defaultAbiCoder.encode(["address"], [ubiImpl.address]), "0"], //upgrade ubi
|
|
90
|
-
[
|
|
91
|
-
release.Identity,
|
|
92
|
-
"upgradeTo(address)",
|
|
93
|
-
ethers.utils.defaultAbiCoder.encode(["address"], [identityImpl.address]),
|
|
94
|
-
"0"
|
|
95
|
-
], //upgrade identity
|
|
96
|
-
[
|
|
97
|
-
release.MpbBridge,
|
|
98
|
-
"upgradeToAndCall(address,bytes)",
|
|
99
|
-
ethers.utils.defaultAbiCoder.encode(["address", "bytes"], [bridgeImpl, upgradeCall]),
|
|
100
|
-
"0"
|
|
101
|
-
], //upgrade bridge
|
|
102
|
-
[
|
|
103
|
-
release.MpbBridge,
|
|
104
|
-
"setConfig(uint16,uint16,uint256,bytes)",
|
|
105
|
-
ethers.utils.defaultAbiCoder.encode(
|
|
106
|
-
["uint16", "uint16", "uint256", "bytes"],
|
|
107
|
-
[0, 365, 5, "0x000000000000000000000000000000000000000000000000000000000000000f"]
|
|
108
|
-
),
|
|
109
|
-
"0"
|
|
110
|
-
], //fix xdc bridge setting of outbound blocks confirmations
|
|
111
|
-
[
|
|
112
|
-
release.MpbBridge,
|
|
113
|
-
"withdraw(address,uint256)",
|
|
114
|
-
ethers.utils.defaultAbiCoder.encode(["address", "uint256"], [release.GoodDollar, 0]),
|
|
115
|
-
"0"
|
|
116
|
-
], //withdraw locked gd
|
|
117
|
-
[release.GoodDollar, "burn(uint256)", ethers.utils.defaultAbiCoder.encode(["uint256"], [toBurn.toString()]), "0"], //burn locked supply on celo bridge
|
|
118
|
-
[
|
|
119
|
-
release.Controller,
|
|
120
|
-
"registerScheme(address,bytes32,bytes4,address)",
|
|
121
|
-
ethers.utils.defaultAbiCoder.encode(
|
|
122
|
-
["address", "bytes32", "bytes4", "address"],
|
|
123
|
-
[release.MpbBridge, ethers.constants.HashZero, "0x00000001", release.Avatar]
|
|
124
|
-
),
|
|
125
|
-
"0"
|
|
126
|
-
]
|
|
127
|
-
];
|
|
128
|
-
|
|
129
|
-
console.log({
|
|
130
|
-
networkEnv,
|
|
131
|
-
guardian: guardian.address,
|
|
132
|
-
isSimulation,
|
|
133
|
-
isProduction,
|
|
134
|
-
release
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
const proposalContracts = proposalActions.map(a => a[0]);
|
|
138
|
-
const proposalFunctionSignatures = proposalActions.map(a => a[1]);
|
|
139
|
-
const proposalFunctionInputs = proposalActions.map(a => a[2]);
|
|
140
|
-
const proposalEthValues = proposalActions.map(a => a[3]);
|
|
141
|
-
if (isProduction && !checksOnly) {
|
|
142
|
-
await executeViaSafe(
|
|
143
|
-
proposalContracts,
|
|
144
|
-
proposalEthValues,
|
|
145
|
-
proposalFunctionSignatures,
|
|
146
|
-
proposalFunctionInputs,
|
|
147
|
-
release.GuardiansSafe,
|
|
148
|
-
"celo"
|
|
149
|
-
);
|
|
150
|
-
} else if (!checksOnly) {
|
|
151
|
-
await executeViaGuardian(
|
|
152
|
-
proposalContracts,
|
|
153
|
-
proposalEthValues,
|
|
154
|
-
proposalFunctionSignatures,
|
|
155
|
-
proposalFunctionInputs,
|
|
156
|
-
guardian,
|
|
157
|
-
networkEnv
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
if (isSimulation || !isProduction) {
|
|
162
|
-
const gd = await ethers.getContractAt("IGoodDollar", release.GoodDollar);
|
|
163
|
-
const supplyAfter = await gd.totalSupply();
|
|
164
|
-
const bridgeBalanceAfter = await gd.balanceOf(release.MpbBridge);
|
|
165
|
-
console.log("Bridge balance after upgrade:", { bridgeBalanceAfter });
|
|
166
|
-
console.log("Supply after upgrade:", { supplyAfter });
|
|
167
|
-
|
|
168
|
-
const ctrl = (await ethers.getContractAt("Controller", release.Controller)) as Controller;
|
|
169
|
-
const isMinterScheme = await ctrl.getSchemePermissions(release.MpbBridge, release.Avatar);
|
|
170
|
-
console.log("Bridge minter permissions on avatar:", isMinterScheme);
|
|
171
|
-
// check xdc chainid in bridge
|
|
172
|
-
const mpb = (await ethers.getContractAt("IMessagePassingBridge", release.MpbBridge)) as IMessagePassingBridge;
|
|
173
|
-
console.log("xdc lz chainid:", await mpb.toLzChainId(50));
|
|
174
|
-
const ubi = (await ethers.getContractAt("UBISchemeV2", release.UBIScheme)) as UBISchemeV2;
|
|
175
|
-
const claimer = await ethers.getImpersonatedSigner("0xA48840D89a761502A4a7d995c74f3864D651A87F");
|
|
176
|
-
const identity = (await ethers.getContractAt("IdentityV3", release.Identity)) as IdentityV3;
|
|
177
|
-
const tx = await (await identity.connect(claimer).connectAccount(guardian.address)).wait();
|
|
178
|
-
console.log("Identity connect account tx:", tx);
|
|
179
|
-
const claimTx = await (await ubi.connect(guardian).claim()).wait();
|
|
180
|
-
console.log("UBI claim from connected account tx:", claimTx.events);
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
export const upgradeCeloFix = async (network, checksOnly) => {
|
|
184
|
-
let [root] = await ethers.getSigners();
|
|
185
|
-
|
|
186
|
-
const isProduction = networkName.includes("production");
|
|
187
|
-
|
|
188
|
-
if (isProduction) verifyProductionSigner(root);
|
|
189
|
-
|
|
190
|
-
let networkEnv = networkName;
|
|
191
|
-
let guardian = root;
|
|
192
|
-
if (isSimulation) {
|
|
193
|
-
networkEnv = network;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
let release: { [key: string]: any } = dao[networkEnv];
|
|
197
|
-
|
|
198
|
-
console.log("signer:", root.address, { networkEnv, isSimulation, isProduction, release });
|
|
199
|
-
|
|
200
|
-
if (isSimulation) {
|
|
201
|
-
networkEnv = network;
|
|
202
|
-
guardian = await ethers.getImpersonatedSigner(release.GuardiansSafe);
|
|
203
|
-
|
|
204
|
-
await root.sendTransaction({
|
|
205
|
-
value: ethers.utils.parseEther("1"),
|
|
206
|
-
to: release.GuardiansSafe
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
const bridgeImpl = bridgeUpgradeImpl[networkEnv];
|
|
211
|
-
const toBurn = "5515965554075495700269228267";
|
|
212
|
-
const proposalActions = [
|
|
213
|
-
[release.MpbBridge, "upgradeTo(address)", ethers.utils.defaultAbiCoder.encode(["address"], [bridgeImpl]), "0"], //upgrade bridge
|
|
214
|
-
[release.GoodDollar, "burn(uint256)", ethers.utils.defaultAbiCoder.encode(["uint256"], [toBurn.toString()]), "0"] //burn locked supply on celo bridge
|
|
215
|
-
];
|
|
216
|
-
|
|
217
|
-
console.log({
|
|
218
|
-
networkEnv,
|
|
219
|
-
guardian: guardian.address,
|
|
220
|
-
isSimulation,
|
|
221
|
-
isProduction,
|
|
222
|
-
release
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
const proposalContracts = proposalActions.map(a => a[0]);
|
|
226
|
-
const proposalFunctionSignatures = proposalActions.map(a => a[1]);
|
|
227
|
-
const proposalFunctionInputs = proposalActions.map(a => a[2]);
|
|
228
|
-
const proposalEthValues = proposalActions.map(a => a[3]);
|
|
229
|
-
if (isProduction && !checksOnly) {
|
|
230
|
-
await executeViaSafe(
|
|
231
|
-
proposalContracts,
|
|
232
|
-
proposalEthValues,
|
|
233
|
-
proposalFunctionSignatures,
|
|
234
|
-
proposalFunctionInputs,
|
|
235
|
-
release.GuardiansSafe,
|
|
236
|
-
"celo",
|
|
237
|
-
{ nonce: 5 }
|
|
238
|
-
);
|
|
239
|
-
} else if (!checksOnly) {
|
|
240
|
-
await executeViaGuardian(
|
|
241
|
-
proposalContracts,
|
|
242
|
-
proposalEthValues,
|
|
243
|
-
proposalFunctionSignatures,
|
|
244
|
-
proposalFunctionInputs,
|
|
245
|
-
guardian,
|
|
246
|
-
networkEnv
|
|
247
|
-
);
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
export const upgradeXdcFix = async (network, checksOnly) => {
|
|
251
|
-
let [root] = await ethers.getSigners();
|
|
252
|
-
|
|
253
|
-
const isProduction = networkName.includes("production");
|
|
254
|
-
|
|
255
|
-
if (isProduction) verifyProductionSigner(root);
|
|
256
|
-
|
|
257
|
-
let networkEnv = networkName;
|
|
258
|
-
let guardian = root;
|
|
259
|
-
if (isSimulation) {
|
|
260
|
-
networkEnv = network;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
let release: { [key: string]: any } = dao[networkEnv];
|
|
264
|
-
|
|
265
|
-
console.log("signer:", root.address, { networkEnv, isSimulation, isProduction, release });
|
|
266
|
-
|
|
267
|
-
if (isSimulation) {
|
|
268
|
-
networkEnv = network;
|
|
269
|
-
guardian = await ethers.getImpersonatedSigner(release.GuardiansSafe);
|
|
270
|
-
|
|
271
|
-
await root.sendTransaction({
|
|
272
|
-
value: ethers.utils.parseEther("1"),
|
|
273
|
-
to: release.GuardiansSafe
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
const bridgeImpl = bridgeUpgradeImpl[networkEnv];
|
|
278
|
-
const proposalActions = [
|
|
279
|
-
[release.MpbBridge, "upgradeTo(address)", ethers.utils.defaultAbiCoder.encode(["address"], [bridgeImpl]), "0"] //upgrade bridge
|
|
280
|
-
];
|
|
281
|
-
|
|
282
|
-
console.log({
|
|
283
|
-
networkEnv,
|
|
284
|
-
guardian: guardian.address,
|
|
285
|
-
isSimulation,
|
|
286
|
-
isProduction,
|
|
287
|
-
release
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
const proposalContracts = proposalActions.map(a => a[0]);
|
|
291
|
-
const proposalFunctionSignatures = proposalActions.map(a => a[1]);
|
|
292
|
-
const proposalFunctionInputs = proposalActions.map(a => a[2]);
|
|
293
|
-
const proposalEthValues = proposalActions.map(a => a[3]);
|
|
294
|
-
if (isProduction && !checksOnly) {
|
|
295
|
-
await executeViaSafe(
|
|
296
|
-
proposalContracts,
|
|
297
|
-
proposalEthValues,
|
|
298
|
-
proposalFunctionSignatures,
|
|
299
|
-
proposalFunctionInputs,
|
|
300
|
-
release.GuardiansSafe,
|
|
301
|
-
"xdc"
|
|
302
|
-
);
|
|
303
|
-
} else if (!checksOnly) {
|
|
304
|
-
await executeViaGuardian(
|
|
305
|
-
proposalContracts,
|
|
306
|
-
proposalEthValues,
|
|
307
|
-
proposalFunctionSignatures,
|
|
308
|
-
proposalFunctionInputs,
|
|
309
|
-
guardian,
|
|
310
|
-
networkEnv
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
export const upgradeFuseFix = async (network, checksOnly) => {
|
|
315
|
-
let [root] = await ethers.getSigners();
|
|
316
|
-
|
|
317
|
-
const isProduction = networkName.includes("production");
|
|
318
|
-
|
|
319
|
-
if (isProduction) verifyProductionSigner(root);
|
|
320
|
-
|
|
321
|
-
let networkEnv = networkName;
|
|
322
|
-
let guardian = root;
|
|
323
|
-
if (isSimulation) {
|
|
324
|
-
networkEnv = network;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
let release: { [key: string]: any } = dao[networkEnv];
|
|
328
|
-
|
|
329
|
-
console.log("signer:", root.address, { networkEnv, isSimulation, isProduction, release });
|
|
330
|
-
|
|
331
|
-
if (isSimulation) {
|
|
332
|
-
networkEnv = network;
|
|
333
|
-
guardian = await ethers.getImpersonatedSigner(release.GuardiansSafe);
|
|
334
|
-
|
|
335
|
-
await root.sendTransaction({
|
|
336
|
-
value: ethers.utils.parseEther("1"),
|
|
337
|
-
to: release.GuardiansSafe
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
const bridgeImpl = bridgeUpgradeImpl[networkEnv];
|
|
342
|
-
const proposalActions = [
|
|
343
|
-
[release.MpbBridge, "upgradeTo(address)", ethers.utils.defaultAbiCoder.encode(["address"], [bridgeImpl]), "0"] //upgrade bridge
|
|
344
|
-
];
|
|
345
|
-
|
|
346
|
-
console.log({
|
|
347
|
-
networkEnv,
|
|
348
|
-
guardian: guardian.address,
|
|
349
|
-
isSimulation,
|
|
350
|
-
isProduction,
|
|
351
|
-
release
|
|
352
|
-
});
|
|
353
|
-
|
|
354
|
-
const proposalContracts = proposalActions.map(a => a[0]);
|
|
355
|
-
const proposalFunctionSignatures = proposalActions.map(a => a[1]);
|
|
356
|
-
const proposalFunctionInputs = proposalActions.map(a => a[2]);
|
|
357
|
-
const proposalEthValues = proposalActions.map(a => a[3]);
|
|
358
|
-
if (isProduction && !checksOnly) {
|
|
359
|
-
await executeViaSafe(
|
|
360
|
-
proposalContracts,
|
|
361
|
-
proposalEthValues,
|
|
362
|
-
proposalFunctionSignatures,
|
|
363
|
-
proposalFunctionInputs,
|
|
364
|
-
release.GuardiansSafe,
|
|
365
|
-
"fuse"
|
|
366
|
-
);
|
|
367
|
-
} else if (!checksOnly) {
|
|
368
|
-
await executeViaGuardian(
|
|
369
|
-
proposalContracts,
|
|
370
|
-
proposalEthValues,
|
|
371
|
-
proposalFunctionSignatures,
|
|
372
|
-
proposalFunctionInputs,
|
|
373
|
-
guardian,
|
|
374
|
-
networkEnv
|
|
375
|
-
);
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
export const upgradeEthFix = async (network, checksOnly) => {
|
|
379
|
-
let [root] = await ethers.getSigners();
|
|
380
|
-
|
|
381
|
-
const isProduction = networkName.includes("production");
|
|
382
|
-
|
|
383
|
-
if (isProduction) verifyProductionSigner(root);
|
|
384
|
-
|
|
385
|
-
let networkEnv = networkName;
|
|
386
|
-
let guardian = root;
|
|
387
|
-
if (isSimulation) {
|
|
388
|
-
networkEnv = network;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
let release: { [key: string]: any } = dao[networkEnv];
|
|
392
|
-
|
|
393
|
-
console.log("signer:", root.address, { networkEnv, isSimulation, isProduction, release });
|
|
394
|
-
|
|
395
|
-
if (isSimulation) {
|
|
396
|
-
networkEnv = network;
|
|
397
|
-
guardian = await ethers.getImpersonatedSigner(release.GuardiansSafe);
|
|
398
|
-
|
|
399
|
-
await root.sendTransaction({
|
|
400
|
-
value: ethers.utils.parseEther("1"),
|
|
401
|
-
to: release.GuardiansSafe
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
const bridgeImpl = bridgeUpgradeImpl[networkEnv];
|
|
406
|
-
const upgradeCall = ethers.utils.keccak256(ethers.utils.toUtf8Bytes("upgrade()")).substring(0, 10);
|
|
407
|
-
|
|
408
|
-
const proposalActions = [
|
|
409
|
-
[
|
|
410
|
-
release.MpbBridge,
|
|
411
|
-
"upgradeToAndCall(address,bytes)",
|
|
412
|
-
ethers.utils.defaultAbiCoder.encode(["address", "bytes"], [bridgeImpl, upgradeCall]),
|
|
413
|
-
"0"
|
|
414
|
-
] //upgrade bridge
|
|
415
|
-
];
|
|
416
|
-
|
|
417
|
-
console.log({
|
|
418
|
-
networkEnv,
|
|
419
|
-
guardian: guardian.address,
|
|
420
|
-
isSimulation,
|
|
421
|
-
isProduction,
|
|
422
|
-
release
|
|
423
|
-
});
|
|
424
|
-
|
|
425
|
-
const proposalContracts = proposalActions.map(a => a[0]);
|
|
426
|
-
const proposalFunctionSignatures = proposalActions.map(a => a[1]);
|
|
427
|
-
const proposalFunctionInputs = proposalActions.map(a => a[2]);
|
|
428
|
-
const proposalEthValues = proposalActions.map(a => a[3]);
|
|
429
|
-
if (isProduction && !checksOnly) {
|
|
430
|
-
await executeViaSafe(
|
|
431
|
-
proposalContracts,
|
|
432
|
-
proposalEthValues,
|
|
433
|
-
proposalFunctionSignatures,
|
|
434
|
-
proposalFunctionInputs,
|
|
435
|
-
release.GuardiansSafe,
|
|
436
|
-
"mainnet",
|
|
437
|
-
{ nonce: 15 }
|
|
438
|
-
);
|
|
439
|
-
} else if (!checksOnly) {
|
|
440
|
-
await executeViaGuardian(
|
|
441
|
-
proposalContracts,
|
|
442
|
-
proposalEthValues,
|
|
443
|
-
proposalFunctionSignatures,
|
|
444
|
-
proposalFunctionInputs,
|
|
445
|
-
guardian,
|
|
446
|
-
networkEnv
|
|
447
|
-
);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
if (isSimulation || !isProduction) {
|
|
451
|
-
const ctrl = (await ethers.getContractAt("Controller", release.Controller)) as Controller;
|
|
452
|
-
const isMinterScheme = await ctrl.getSchemePermissions(release.MpbBridge, release.Avatar);
|
|
453
|
-
console.log("Bridge minter permissions on avatar:", isMinterScheme);
|
|
454
|
-
// check xdc chainid in bridge
|
|
455
|
-
const mpb = (await ethers.getContractAt("IMessagePassingBridge", release.MpbBridge)) as IMessagePassingBridge;
|
|
456
|
-
console.log("xdc lz chainid:", await mpb.toLzChainId(50));
|
|
457
|
-
}
|
|
458
|
-
};
|
|
459
|
-
|
|
460
|
-
export const verifyUpgradeCeloStep1 = async networkEnv => {
|
|
461
|
-
let release: { [key: string]: any } = dao[networkEnv];
|
|
462
|
-
const ctrl = (await ethers.getContractAt("Controller", release.Controller)) as Controller;
|
|
463
|
-
const isMinterScheme = await ctrl.getSchemePermissions(release.MpbBridge, release.Avatar);
|
|
464
|
-
console.log("Bridge minter permissions on avatar:", isMinterScheme);
|
|
465
|
-
// check xdc chainid in bridge
|
|
466
|
-
const mpb = (await ethers.getContractAt("IMessagePassingBridge", release.MpbBridge)) as IMessagePassingBridge;
|
|
467
|
-
console.log("xdc lz chainid:", await mpb.toLzChainId(50));
|
|
468
|
-
const gd = await ethers.getContractAt("IGoodDollar", release.GoodDollar);
|
|
469
|
-
const supplyAfter = await gd.totalSupply();
|
|
470
|
-
const bridgeBalanceAfter = await gd.balanceOf(release.MpbBridge);
|
|
471
|
-
const avatarBalanceAfter = await gd.balanceOf(release.Avatar);
|
|
472
|
-
console.log({ bridgeBalanceAfter, avatarBalanceAfter, supplyAfter });
|
|
473
|
-
};
|
|
474
|
-
|
|
475
|
-
export const upgradeFuseStep1 = async (network, checksOnly) => {
|
|
476
|
-
let [root] = await ethers.getSigners();
|
|
477
|
-
|
|
478
|
-
const isProduction = networkName.includes("production");
|
|
479
|
-
|
|
480
|
-
if (isProduction) verifyProductionSigner(root);
|
|
481
|
-
|
|
482
|
-
let networkEnv = networkName;
|
|
483
|
-
let guardian = root;
|
|
484
|
-
if (isSimulation) {
|
|
485
|
-
networkEnv = network;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
let release: { [key: string]: any } = dao[networkEnv];
|
|
489
|
-
|
|
490
|
-
console.log("signer:", root.address, { networkEnv, isSimulation, isProduction, release });
|
|
491
|
-
|
|
492
|
-
if (isSimulation) {
|
|
493
|
-
networkEnv = network;
|
|
494
|
-
guardian = await ethers.getImpersonatedSigner(release.GuardiansSafe);
|
|
495
|
-
|
|
496
|
-
await root.sendTransaction({
|
|
497
|
-
value: ethers.utils.parseEther("1"),
|
|
498
|
-
to: release.GuardiansSafe
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
const ubiImpl = await ethers.deployContract("UBISchemeV2");
|
|
503
|
-
const identityImpl = await ethers.deployContract("IdentityV3");
|
|
504
|
-
const bridgeImpl = bridgeUpgradeImpl[networkEnv];
|
|
505
|
-
const upgradeCall = ethers.utils.keccak256(ethers.utils.toUtf8Bytes("upgrade()")).substring(0, 10);
|
|
506
|
-
|
|
507
|
-
// Extract the first four bytes as the function selector
|
|
508
|
-
console.log("deployed new impls", { ubiImpl: ubiImpl.address, identityImpl: identityImpl.address });
|
|
509
|
-
|
|
510
|
-
const proposalActions = [
|
|
511
|
-
[release.UBIScheme, "upgradeTo(address)", ethers.utils.defaultAbiCoder.encode(["address"], [ubiImpl.address]), "0"], //upgrade ubi
|
|
512
|
-
[
|
|
513
|
-
release.Identity,
|
|
514
|
-
"upgradeTo(address)",
|
|
515
|
-
ethers.utils.defaultAbiCoder.encode(["address"], [identityImpl.address]),
|
|
516
|
-
"0"
|
|
517
|
-
], //upgrade identity
|
|
518
|
-
[
|
|
519
|
-
release.MpbBridge,
|
|
520
|
-
"upgradeToAndCall(address,bytes)",
|
|
521
|
-
ethers.utils.defaultAbiCoder.encode(["address", "bytes"], [bridgeImpl, upgradeCall]),
|
|
522
|
-
"0"
|
|
523
|
-
], //upgrade bridge
|
|
524
|
-
[
|
|
525
|
-
release.MpbBridge,
|
|
526
|
-
"setConfig(uint16,uint16,uint256,bytes)",
|
|
527
|
-
ethers.utils.defaultAbiCoder.encode(
|
|
528
|
-
["uint16", "uint16", "uint256", "bytes"],
|
|
529
|
-
[0, 365, 5, "0x000000000000000000000000000000000000000000000000000000000000000f"]
|
|
530
|
-
),
|
|
531
|
-
"0"
|
|
532
|
-
] //fix xdc bridge setting of outbound blocks confirmations
|
|
533
|
-
];
|
|
534
|
-
|
|
535
|
-
console.log({
|
|
536
|
-
networkEnv,
|
|
537
|
-
guardian: guardian.address,
|
|
538
|
-
isSimulation,
|
|
539
|
-
isProduction,
|
|
540
|
-
release
|
|
541
|
-
});
|
|
542
|
-
|
|
543
|
-
const proposalContracts = proposalActions.map(a => a[0]);
|
|
544
|
-
const proposalFunctionSignatures = proposalActions.map(a => a[1]);
|
|
545
|
-
const proposalFunctionInputs = proposalActions.map(a => a[2]);
|
|
546
|
-
const proposalEthValues = proposalActions.map(a => a[3]);
|
|
547
|
-
if (isProduction && !checksOnly) {
|
|
548
|
-
await executeViaSafe(
|
|
549
|
-
proposalContracts,
|
|
550
|
-
proposalEthValues,
|
|
551
|
-
proposalFunctionSignatures,
|
|
552
|
-
proposalFunctionInputs,
|
|
553
|
-
release.GuardiansSafe,
|
|
554
|
-
"fuse"
|
|
555
|
-
);
|
|
556
|
-
} else if (!checksOnly) {
|
|
557
|
-
await executeViaGuardian(
|
|
558
|
-
proposalContracts,
|
|
559
|
-
proposalEthValues,
|
|
560
|
-
proposalFunctionSignatures,
|
|
561
|
-
proposalFunctionInputs,
|
|
562
|
-
guardian,
|
|
563
|
-
networkEnv
|
|
564
|
-
);
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
if (isSimulation || !isProduction) {
|
|
568
|
-
const ctrl = (await ethers.getContractAt("Controller", release.Controller)) as Controller;
|
|
569
|
-
const isMinterScheme = await ctrl.getSchemePermissions(release.MpbBridge, release.Avatar);
|
|
570
|
-
console.log("Bridge minter permissions on avatar:", isMinterScheme);
|
|
571
|
-
// check xdc chainid in bridge
|
|
572
|
-
const mpb = (await ethers.getContractAt("IMessagePassingBridge", release.MpbBridge)) as IMessagePassingBridge;
|
|
573
|
-
console.log("xdc lz chainid:", await mpb.toLzChainId(50));
|
|
574
|
-
const ubi = (await ethers.getContractAt("UBISchemeV2", release.UBIScheme)) as UBISchemeV2;
|
|
575
|
-
const claimer = await ethers.getImpersonatedSigner("0xA48840D89a761502A4a7d995c74f3864D651A87F");
|
|
576
|
-
const identity = (await ethers.getContractAt("IdentityV3", release.Identity)) as IdentityV3;
|
|
577
|
-
const tx = await (await identity.connect(claimer).connectAccount(guardian.address)).wait();
|
|
578
|
-
console.log("Identity connect account tx:", tx);
|
|
579
|
-
const claimTx = await (await ubi.connect(guardian).claim()).wait();
|
|
580
|
-
console.log("UBI claim from connected account tx:", claimTx.events);
|
|
581
|
-
}
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
export const upgradeEthStep1 = async (network, checksOnly) => {
|
|
585
|
-
let [root] = await ethers.getSigners();
|
|
586
|
-
|
|
587
|
-
const isProduction = networkName.includes("production");
|
|
588
|
-
|
|
589
|
-
if (isProduction) verifyProductionSigner(root);
|
|
590
|
-
|
|
591
|
-
let networkEnv = networkName;
|
|
592
|
-
let guardian = root;
|
|
593
|
-
if (isSimulation) {
|
|
594
|
-
networkEnv = network;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
let release: { [key: string]: any } = dao[networkEnv];
|
|
598
|
-
|
|
599
|
-
console.log("signer:", root.address, { networkEnv, isSimulation, isProduction, release });
|
|
600
|
-
|
|
601
|
-
if (isSimulation) {
|
|
602
|
-
networkEnv = network;
|
|
603
|
-
guardian = await ethers.getImpersonatedSigner(release.GuardiansSafe);
|
|
604
|
-
|
|
605
|
-
await root.sendTransaction({
|
|
606
|
-
value: ethers.utils.parseEther("1"),
|
|
607
|
-
to: release.GuardiansSafe
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
const bridgeImpl = bridgeUpgradeImpl[networkEnv];
|
|
612
|
-
const upgradeCall = ethers.utils.keccak256(ethers.utils.toUtf8Bytes("upgrade()")).substring(0, 10);
|
|
613
|
-
|
|
614
|
-
const proposalActions = [
|
|
615
|
-
[
|
|
616
|
-
release.MpbBridge,
|
|
617
|
-
"upgradeToAndCall(address,bytes)",
|
|
618
|
-
ethers.utils.defaultAbiCoder.encode(["address", "bytes"], [bridgeImpl, upgradeCall]),
|
|
619
|
-
"0"
|
|
620
|
-
] //upgrade bridge
|
|
621
|
-
];
|
|
622
|
-
|
|
623
|
-
console.log({
|
|
624
|
-
networkEnv,
|
|
625
|
-
guardian: guardian.address,
|
|
626
|
-
isSimulation,
|
|
627
|
-
isProduction,
|
|
628
|
-
release
|
|
629
|
-
});
|
|
630
|
-
|
|
631
|
-
const proposalContracts = proposalActions.map(a => a[0]);
|
|
632
|
-
const proposalFunctionSignatures = proposalActions.map(a => a[1]);
|
|
633
|
-
const proposalFunctionInputs = proposalActions.map(a => a[2]);
|
|
634
|
-
const proposalEthValues = proposalActions.map(a => a[3]);
|
|
635
|
-
if (isProduction && !checksOnly) {
|
|
636
|
-
await executeViaSafe(
|
|
637
|
-
proposalContracts,
|
|
638
|
-
proposalEthValues,
|
|
639
|
-
proposalFunctionSignatures,
|
|
640
|
-
proposalFunctionInputs,
|
|
641
|
-
release.GuardiansSafe,
|
|
642
|
-
"mainnet"
|
|
643
|
-
);
|
|
644
|
-
} else if (!checksOnly) {
|
|
645
|
-
await executeViaGuardian(
|
|
646
|
-
proposalContracts,
|
|
647
|
-
proposalEthValues,
|
|
648
|
-
proposalFunctionSignatures,
|
|
649
|
-
proposalFunctionInputs,
|
|
650
|
-
guardian,
|
|
651
|
-
networkEnv
|
|
652
|
-
);
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
if (isSimulation || !isProduction) {
|
|
656
|
-
const ctrl = (await ethers.getContractAt("Controller", release.Controller)) as Controller;
|
|
657
|
-
const isMinterScheme = await ctrl.getSchemePermissions(release.MpbBridge, release.Avatar);
|
|
658
|
-
console.log("Bridge minter permissions on avatar:", isMinterScheme);
|
|
659
|
-
// check xdc chainid in bridge
|
|
660
|
-
const mpb = (await ethers.getContractAt("IMessagePassingBridge", release.MpbBridge)) as IMessagePassingBridge;
|
|
661
|
-
console.log("xdc lz chainid:", await mpb.toLzChainId(50));
|
|
662
|
-
}
|
|
663
|
-
};
|
|
664
|
-
|
|
665
|
-
const calculateReserveParams = async () => {
|
|
666
|
-
const celoProvider = new ethers.providers.JsonRpcProvider("https://forno.celo.org");
|
|
667
|
-
const gd = await ethers.getContractAt("GoodDollar", dao["production-celo"].GoodDollar);
|
|
668
|
-
const celoCusd = (await ethers.getContractAt("IERC20", dao["production-celo"].CUSD)).connect(celoProvider);
|
|
669
|
-
const gdCelo = gd.connect(celoProvider);
|
|
670
|
-
const totalSupplyCelo = await gdCelo.totalSupply();
|
|
671
|
-
const reserveBalance = await celoCusd.balanceOf(dao["production-celo"].MentoReserve);
|
|
672
|
-
const xdcReserveBalance = ethers.utils.parseUnits("200000", 18); //200k in xdc
|
|
673
|
-
const totalUSD = reserveBalance.add(xdcReserveBalance); //reserve + 200k in xdc
|
|
674
|
-
const xdcSupplyShare = xdcReserveBalance.mul(1e8).div(totalUSD);
|
|
675
|
-
const xdcGdSupplyEquivalent = totalSupplyCelo.mul(xdcSupplyShare).div(1e8);
|
|
676
|
-
const price = ethers.utils.parseUnits("0.00013", 8);
|
|
677
|
-
const celoGdSupplyEquivalent = totalSupplyCelo.sub(xdcGdSupplyEquivalent);
|
|
678
|
-
|
|
679
|
-
console.log({
|
|
680
|
-
totalSupplyCelo,
|
|
681
|
-
reserveBalance,
|
|
682
|
-
totalUSD,
|
|
683
|
-
xdcSupplyShare,
|
|
684
|
-
xdcGdSupplyEquivalent,
|
|
685
|
-
celoGdSupplyEquivalent
|
|
686
|
-
});
|
|
687
|
-
|
|
688
|
-
// uint32 reserveRatio = uint32(
|
|
689
|
-
// (cUSDBalance * 1e18 * 1e8) / (price * totalGlobalSupply)
|
|
690
|
-
// );
|
|
691
|
-
//calculate reserve ratio
|
|
692
|
-
const reserveRatioXdc = xdcReserveBalance
|
|
693
|
-
.mul(ethers.BigNumber.from("100000000")) //1e8
|
|
694
|
-
.mul(ethers.BigNumber.from("1000000000000000000")) //1e18
|
|
695
|
-
.div(xdcGdSupplyEquivalent.mul(price));
|
|
696
|
-
console.log(
|
|
697
|
-
"recommended reserve ratio for xdc:",
|
|
698
|
-
reserveRatioXdc.toString(),
|
|
699
|
-
reserveRatioXdc.div("10000000000").toNumber() / 1e8
|
|
700
|
-
);
|
|
701
|
-
|
|
702
|
-
//calcualte reserve ratio for celo
|
|
703
|
-
const reserveRatioCelo = reserveBalance
|
|
704
|
-
.mul(ethers.BigNumber.from("100000000")) //1e8
|
|
705
|
-
.mul(ethers.BigNumber.from("1000000000000000000")) //1e18
|
|
706
|
-
.div(celoGdSupplyEquivalent.mul(price));
|
|
707
|
-
|
|
708
|
-
console.log(
|
|
709
|
-
"recommended reserve ratio for celo:",
|
|
710
|
-
reserveRatioCelo.toString(),
|
|
711
|
-
reserveRatioCelo.div("10000000000").toNumber() / 1e8
|
|
712
|
-
);
|
|
713
|
-
};
|
|
714
|
-
|
|
715
|
-
export const main = async () => {
|
|
716
|
-
// await calculateReserveParams();
|
|
717
|
-
// return;
|
|
718
|
-
prompt.start();
|
|
719
|
-
const { network } = await prompt.get(["network"]);
|
|
720
|
-
|
|
721
|
-
console.log("running step:", { network });
|
|
722
|
-
const chain = last(network.split("-")) || "fuse";
|
|
723
|
-
console.log("detected chain:", chain, network);
|
|
724
|
-
switch (chain) {
|
|
725
|
-
case "mainnet":
|
|
726
|
-
await upgradeEthStep1(network, false);
|
|
727
|
-
|
|
728
|
-
break;
|
|
729
|
-
case "production":
|
|
730
|
-
case "fuse":
|
|
731
|
-
await upgradeFuseStep1(network, false);
|
|
732
|
-
|
|
733
|
-
break;
|
|
734
|
-
case "celo":
|
|
735
|
-
await upgradeCeloStep1(network, false);
|
|
736
|
-
|
|
737
|
-
break;
|
|
738
|
-
}
|
|
739
|
-
};
|
|
740
|
-
|
|
741
|
-
// upgradeCeloFix("production-celo", false).catch(console.log);
|
|
742
|
-
// upgradeEthFix("production-mainnet", false).catch(console.log);
|
|
743
|
-
upgradeFuseFix("production", false).catch(console.log);
|
|
744
|
-
// upgradeXdcFix("production-xdc", false).catch(console.log);
|
|
745
|
-
// verifyUpgradeCeloStep1("production-celo");
|
|
746
|
-
// main().catch(console.log);
|