@gooddollar/goodprotocol 2.0.32-beta.0 → 2.0.32
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/artifacts/abis/CeloDistributionHelper.min.json +1 -0
- package/artifacts/abis/CeloDistributionHelperTest.min.json +1 -0
- package/artifacts/abis/CeloDistributionHelperTestHelper.min.json +1 -0
- package/artifacts/abis/IBancorExchangeProvider.min.json +1 -0
- package/artifacts/abis/IBroker.min.json +1 -0
- package/artifacts/abis/IGoodDollarExchangeProvider.min.json +1 -0
- package/artifacts/abis/IGoodDollarExpansionController.min.json +1 -0
- package/artifacts/abis/IMentoReserve.min.json +1 -0
- package/artifacts/abis/ITradingLimits.min.json +1 -0
- package/artifacts/abis/MentoExchange.min.json +1 -0
- package/artifacts/abis/ProtocolUpgradeV4Mento.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/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 +4 -0
- package/artifacts/contracts/MentoInterfaces.sol/IBancorExchangeProvider.json +282 -0
- package/artifacts/contracts/MentoInterfaces.sol/IBroker.dbg.json +4 -0
- package/artifacts/contracts/MentoInterfaces.sol/IBroker.json +491 -0
- package/artifacts/contracts/MentoInterfaces.sol/IGoodDollarExchangeProvider.dbg.json +4 -0
- package/artifacts/contracts/MentoInterfaces.sol/IGoodDollarExchangeProvider.json +164 -0
- package/artifacts/contracts/MentoInterfaces.sol/IGoodDollarExpansionController.dbg.json +4 -0
- package/artifacts/contracts/MentoInterfaces.sol/IGoodDollarExpansionController.json +333 -0
- package/artifacts/contracts/MentoInterfaces.sol/IMentoReserve.dbg.json +4 -0
- package/artifacts/contracts/MentoInterfaces.sol/IMentoReserve.json +927 -0
- package/artifacts/contracts/MentoInterfaces.sol/ITradingLimits.dbg.json +4 -0
- package/artifacts/contracts/MentoInterfaces.sol/ITradingLimits.json +10 -0
- 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/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/governance/StakersDistribution.sol/StakersDistribution.json +2 -2
- package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
- 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 +4 -0
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTest.json +864 -0
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTestHelper.dbg.json +4 -0
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTestHelper.json +890 -0
- 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/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.json +2 -2
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.json +2 -2
- 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/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.json +2 -2
- package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.json +2 -2
- 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/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/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.json +2 -2
- 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/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 +4 -0
- package/artifacts/contracts/reserve/CeloDistributionHelper.sol/CeloDistributionHelper.json +864 -0
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.json +2 -2
- package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.json +2 -2
- package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.json +2 -2
- 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/reserve/GoodReserveCDai.sol/GoodReserveCDai.json +2 -2
- 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/DonationsStaking.sol/DonationsStaking.json +2 -2
- 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/GoodFundManager.sol/GoodFundManager.json +2 -2
- 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/AaveStakingFactory.sol/AaveStakingFactory.json +2 -2
- package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.json +2 -2
- package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.json +2 -2
- package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.json +2 -2
- package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.json +2 -2
- package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.json +2 -2
- 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/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/BulkProof.sol/BulkProof.json +2 -2
- 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/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.json +2 -2
- 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 +4 -0
- package/artifacts/contracts/utils/ProtoclUpgradeV4Mento.sol/MentoExchange.json +24 -0
- package/artifacts/contracts/utils/ProtoclUpgradeV4Mento.sol/ProtocolUpgradeV4Mento.dbg.json +4 -0
- package/artifacts/contracts/utils/ProtoclUpgradeV4Mento.sol/ProtocolUpgradeV4Mento.json +92 -0
- 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/MentoInterfaces.sol +746 -0
- package/contracts/mocks/CeloDistributionHelperTest.sol +25 -0
- package/contracts/reserve/CeloDistributionHelper.sol +286 -0
- package/contracts/reserve/GoodMarketMaker.sol +11 -1
- package/contracts/staking/GoodFundManager.sol +5 -2
- package/contracts/utils/ProtoclUpgradeV4Mento.sol +99 -0
- package/contracts/utils/ReserveRestore.sol +171 -147
- package/hardhat.config.ts +4 -4
- package/package.json +5 -2
- package/releases/deployment.json +7 -5
- package/scripts/multichain-deploy/helpers.ts +45 -24
- package/scripts/proposals/reserveRestore.ts +130 -85
- package/scripts/proposals/v4Upgrade.ts +845 -0
- package/test/reserve/CeloDistributionHelper.test.ts +377 -0
- package/test/reserve/GoodMarketMaker.test.ts +98 -35
- package/test/zzz - e2e/CeloDistributionHelper.e2e.test.ts +0 -0
- package/types/contracts/MentoInterfaces.sol/IBancorExchangeProvider.ts +422 -0
- package/types/contracts/MentoInterfaces.sol/IBroker.ts +727 -0
- package/types/contracts/MentoInterfaces.sol/IGoodDollarExchangeProvider.ts +341 -0
- package/types/contracts/MentoInterfaces.sol/IGoodDollarExpansionController.ts +617 -0
- package/types/contracts/MentoInterfaces.sol/IMentoReserve.ts +1700 -0
- package/types/contracts/MentoInterfaces.sol/index.ts +8 -0
- package/types/contracts/index.ts +2 -0
- package/types/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTest.ts +1226 -0
- package/types/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTestHelper.ts +1279 -0
- package/types/contracts/mocks/CeloDistributionHelperTest.sol/index.ts +5 -0
- package/types/contracts/mocks/index.ts +2 -0
- package/types/contracts/reserve/CeloDistributionHelper.ts +1226 -0
- package/types/contracts/reserve/index.ts +1 -0
- package/types/contracts/utils/ProtoclUpgradeV4Mento.sol/MentoExchange.ts +81 -0
- package/types/contracts/utils/ProtoclUpgradeV4Mento.sol/ProtocolUpgradeV4Mento.ts +161 -0
- package/types/contracts/utils/ProtoclUpgradeV4Mento.sol/index.ts +5 -0
- package/types/contracts/utils/index.ts +2 -0
- package/types/factories/contracts/MentoInterfaces.sol/IBancorExchangeProvider__factory.ts +301 -0
- package/types/factories/contracts/MentoInterfaces.sol/IBroker__factory.ts +506 -0
- package/types/factories/contracts/MentoInterfaces.sol/IGoodDollarExchangeProvider__factory.ts +183 -0
- package/types/factories/contracts/MentoInterfaces.sol/IGoodDollarExpansionController__factory.ts +352 -0
- package/types/factories/contracts/MentoInterfaces.sol/IMentoReserve__factory.ts +942 -0
- package/types/factories/contracts/MentoInterfaces.sol/index.ts +8 -0
- package/types/factories/contracts/governance/StakersDistribution__factory.ts +1 -1
- package/types/factories/contracts/index.ts +1 -0
- package/types/factories/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTestHelper__factory.ts +949 -0
- package/types/factories/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTest__factory.ts +919 -0
- package/types/factories/contracts/mocks/CeloDistributionHelperTest.sol/index.ts +5 -0
- package/types/factories/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper__factory.ts +1 -1
- package/types/factories/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest__factory.ts +1 -1
- package/types/factories/contracts/mocks/GoodCompoundStakingTest__factory.ts +1 -1
- package/types/factories/contracts/mocks/GoodFundManagerTest__factory.ts +1 -1
- package/types/factories/contracts/mocks/OverMintTesterRegularStake__factory.ts +1 -1
- package/types/factories/contracts/mocks/index.ts +1 -0
- package/types/factories/contracts/reserve/CeloDistributionHelper__factory.ts +919 -0
- package/types/factories/contracts/reserve/DistributionHelper__factory.ts +1 -1
- package/types/factories/contracts/reserve/ExchangeHelper__factory.ts +1 -1
- package/types/factories/contracts/reserve/GoodMarketMaker__factory.ts +1 -1
- package/types/factories/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai__factory.ts +1 -1
- package/types/factories/contracts/reserve/index.ts +1 -0
- package/types/factories/contracts/staking/DonationsStaking__factory.ts +1 -1
- package/types/factories/contracts/staking/GoodFundManager__factory.ts +1 -1
- package/types/factories/contracts/staking/aave/AaveStakingFactory__factory.ts +1 -1
- package/types/factories/contracts/staking/aave/GoodAaveStakingV2__factory.ts +1 -1
- package/types/factories/contracts/staking/aave/GoodAaveStaking__factory.ts +1 -1
- package/types/factories/contracts/staking/compound/CompoundStakingFactory__factory.ts +1 -1
- package/types/factories/contracts/staking/compound/GoodCompoundStakingV2__factory.ts +1 -1
- package/types/factories/contracts/staking/compound/GoodCompoundStaking__factory.ts +1 -1
- package/types/factories/contracts/utils/BuyAndBridgeHelper__factory.ts +1 -1
- package/types/factories/contracts/utils/LastauthReduction__factory.ts +1 -1
- package/types/factories/contracts/utils/ProtoclUpgradeV4Mento.sol/MentoExchange__factory.ts +39 -0
- package/types/factories/contracts/utils/ProtoclUpgradeV4Mento.sol/ProtocolUpgradeV4Mento__factory.ts +152 -0
- package/types/factories/contracts/utils/ProtoclUpgradeV4Mento.sol/index.ts +5 -0
- package/types/factories/contracts/utils/ReserveRestore__factory.ts +1 -1
- package/types/factories/contracts/utils/index.ts +1 -0
- package/types/hardhat.d.ts +90 -0
- package/types/index.ts +20 -0
|
@@ -7,151 +7,175 @@ import "../reserve/GoodReserveCDai.sol";
|
|
|
7
7
|
import "hardhat/console.sol";
|
|
8
8
|
|
|
9
9
|
contract ReserveRestore {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
10
|
+
NameService ns;
|
|
11
|
+
uint256 public constant LOCKED_HACKED_FUNDS = 971921364208;
|
|
12
|
+
bool public executed;
|
|
13
|
+
address owner;
|
|
14
|
+
|
|
15
|
+
constructor(NameService _ns) {
|
|
16
|
+
ns = _ns;
|
|
17
|
+
owner = msg.sender;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function end() external {
|
|
21
|
+
require(msg.sender == owner, "not owner");
|
|
22
|
+
Controller ctrl = Controller(ns.getAddress("CONTROLLER"));
|
|
23
|
+
address avatar = ns.dao().avatar();
|
|
24
|
+
|
|
25
|
+
// prevent executing again}
|
|
26
|
+
require(ctrl.unregisterSelf(avatar), "unregistering failed");
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function donate(address daiFrom, uint256 amount) external {
|
|
30
|
+
require(msg.sender == owner, "not owner");
|
|
31
|
+
address avatar = ns.dao().avatar();
|
|
32
|
+
|
|
33
|
+
GoodReserveCDai reserve = GoodReserveCDai(ns.getAddress("RESERVE"));
|
|
34
|
+
ERC20(ns.getAddress("DAI")).transferFrom(
|
|
35
|
+
daiFrom,
|
|
36
|
+
address(this),
|
|
37
|
+
amount
|
|
38
|
+
);
|
|
39
|
+
uint256 daiBalance = ERC20(ns.getAddress("DAI")).balanceOf(
|
|
40
|
+
address(this)
|
|
41
|
+
);
|
|
42
|
+
cERC20 cdai = cERC20(ns.getAddress("CDAI"));
|
|
43
|
+
ERC20 dai = ERC20(ns.getAddress("DAI"));
|
|
44
|
+
|
|
45
|
+
dai.approve(address(cdai), daiBalance);
|
|
46
|
+
//Mint cDAIs
|
|
47
|
+
uint256 cDaiResult = cdai.mint(daiBalance);
|
|
48
|
+
require(cDaiResult == 0, "Minting cDai failed");
|
|
49
|
+
uint256 cdaiBalance = cdai.balanceOf(address(this));
|
|
50
|
+
cdai.transfer(address(reserve), cdaiBalance);
|
|
51
|
+
cdaiBalance = cdai.balanceOf(address(reserve));
|
|
52
|
+
|
|
53
|
+
uint256 gdSupply = ERC20(ns.getAddress("GOODDOLLAR")).totalSupply() -
|
|
54
|
+
LOCKED_HACKED_FUNDS;
|
|
55
|
+
console.log("supply: %s", gdSupply);
|
|
56
|
+
// get 0.0001 dai price in cdai
|
|
57
|
+
uint256 currentPrice = reserve.currentPrice();
|
|
58
|
+
console.log("currentPrice: %s", currentPrice);
|
|
59
|
+
|
|
60
|
+
console.log("cdaiBalance: %s", cdaiBalance);
|
|
61
|
+
|
|
62
|
+
// given price calculate the reserve ratio
|
|
63
|
+
uint32 reserveRatio = uint32(
|
|
64
|
+
(cdaiBalance * 1e2 * 1e6) / (currentPrice * gdSupply)
|
|
65
|
+
); // mul by 1e2 to cover gd precision, cdaibalance precision=initialprice, mul by 1e6 to receive result in the precision of reserveRatio(1e6)
|
|
66
|
+
console.log("reserveRatio: %s", reserveRatio);
|
|
67
|
+
Controller ctrl = Controller(ns.getAddress("CONTROLLER"));
|
|
68
|
+
// function initializeToken(
|
|
69
|
+
// ERC20 _token,
|
|
70
|
+
// uint256 _gdSupply,
|
|
71
|
+
// uint256 _tokenSupply,
|
|
72
|
+
// uint32 _reserveRatio,
|
|
73
|
+
// uint256 _lastExpansion
|
|
74
|
+
// )
|
|
75
|
+
(bool ok, ) = ctrl.genericCall(
|
|
76
|
+
address(reserve.getMarketMaker()),
|
|
77
|
+
abi.encodeCall(
|
|
78
|
+
GoodMarketMaker.initializeToken,
|
|
79
|
+
(cdai, gdSupply, cdaiBalance, reserveRatio, block.timestamp)
|
|
80
|
+
),
|
|
81
|
+
address(avatar),
|
|
82
|
+
0
|
|
83
|
+
);
|
|
84
|
+
require(ok, "initializeToken failed");
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function upgrade(address daiFrom, uint256 amount) external {
|
|
88
|
+
require(msg.sender == owner, "not owner");
|
|
89
|
+
require(executed == false, "already upgraded");
|
|
90
|
+
executed = true;
|
|
91
|
+
address avatar = ns.dao().avatar();
|
|
92
|
+
|
|
93
|
+
GoodReserveCDai reserve = GoodReserveCDai(ns.getAddress("RESERVE"));
|
|
94
|
+
ERC20(ns.getAddress("DAI")).transferFrom(
|
|
95
|
+
daiFrom,
|
|
96
|
+
address(this),
|
|
97
|
+
amount
|
|
98
|
+
);
|
|
99
|
+
uint256 daiBalance = ERC20(ns.getAddress("DAI")).balanceOf(
|
|
100
|
+
address(this)
|
|
101
|
+
);
|
|
102
|
+
require(daiBalance >= 50000e18, "not enough reserve");
|
|
103
|
+
cERC20 cdai = cERC20(ns.getAddress("CDAI"));
|
|
104
|
+
ERC20 dai = ERC20(ns.getAddress("DAI"));
|
|
105
|
+
|
|
106
|
+
dai.approve(address(cdai), daiBalance);
|
|
107
|
+
//Mint cDAIs
|
|
108
|
+
uint256 cDaiResult = cdai.mint(daiBalance);
|
|
109
|
+
require(cDaiResult == 0, "Minting cDai failed");
|
|
110
|
+
uint256 cdaiBalance = cdai.balanceOf(address(this));
|
|
111
|
+
cdai.transfer(address(reserve), cdaiBalance);
|
|
112
|
+
cdaiBalance = cdai.balanceOf(address(reserve));
|
|
113
|
+
|
|
114
|
+
uint256 gdSupply = ERC20(ns.getAddress("GOODDOLLAR")).totalSupply() -
|
|
115
|
+
LOCKED_HACKED_FUNDS;
|
|
116
|
+
console.log("supply: %s", gdSupply);
|
|
117
|
+
// get 0.0001 dai price in cdai
|
|
118
|
+
uint256 initialPriceCdai = (0.0001 * 1e8 * 1e28) /
|
|
119
|
+
cdai.exchangeRateStored(); //excghange rate is at 1e28 precision rate/1e28=1 cdai price in dai mul by 1e8 to get in cdai precision
|
|
120
|
+
console.log("initialPriceCdai: %s", initialPriceCdai);
|
|
121
|
+
|
|
122
|
+
console.log("cdaiBalance: %s", cdaiBalance);
|
|
123
|
+
|
|
124
|
+
// given price calculate the reserve ratio
|
|
125
|
+
uint32 reserveRatio = uint32(
|
|
126
|
+
(cdaiBalance * 1e2 * 1e6) / (initialPriceCdai * gdSupply)
|
|
127
|
+
); // mul by 1e2 to cover gd precision, cdaibalance precision=initialprice, mul by 1e6 to receive result in the precision of reserveRatio(1e6)
|
|
128
|
+
console.log("reserveRatio: %s", reserveRatio);
|
|
129
|
+
Controller ctrl = Controller(ns.getAddress("CONTROLLER"));
|
|
130
|
+
// function initializeToken(
|
|
131
|
+
// ERC20 _token,
|
|
132
|
+
// uint256 _gdSupply,
|
|
133
|
+
// uint256 _tokenSupply,
|
|
134
|
+
// uint32 _reserveRatio,
|
|
135
|
+
// uint256 _lastExpansion
|
|
136
|
+
// )
|
|
137
|
+
(bool ok, ) = ctrl.genericCall(
|
|
138
|
+
address(reserve.getMarketMaker()),
|
|
139
|
+
abi.encodeCall(
|
|
140
|
+
GoodMarketMaker.initializeToken,
|
|
141
|
+
(cdai, gdSupply, cdaiBalance, reserveRatio, block.timestamp)
|
|
142
|
+
),
|
|
143
|
+
address(avatar),
|
|
144
|
+
0
|
|
145
|
+
);
|
|
146
|
+
require(ok, "initializeToken failed");
|
|
147
|
+
// ContributionCalc(
|
|
148
|
+
// ns.getAddress("CONTRIBUTION_CALCULATION")
|
|
149
|
+
// ).setContributionRatio(0.1*1e18,1e18);
|
|
150
|
+
|
|
151
|
+
// exit contribution to 10%
|
|
152
|
+
(ok, ) = ctrl.genericCall(
|
|
153
|
+
address(ns.getAddress("CONTRIBUTION_CALCULATION")),
|
|
154
|
+
abi.encodeCall(
|
|
155
|
+
ContributionCalc.setContributionRatio,
|
|
156
|
+
(0.1 * 1e18, 1e18)
|
|
157
|
+
),
|
|
158
|
+
address(avatar),
|
|
159
|
+
0
|
|
160
|
+
);
|
|
161
|
+
require(ok, "setContributionRatio failed");
|
|
162
|
+
|
|
163
|
+
(ok, ) = ctrl.genericCall(
|
|
164
|
+
address(reserve),
|
|
165
|
+
abi.encodeCall(GoodReserveCDai.setGDXDisabled, (true, true)),
|
|
166
|
+
address(avatar),
|
|
167
|
+
0
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
require(ok, "gdx disable failed");
|
|
171
|
+
|
|
172
|
+
// unpause reserve
|
|
173
|
+
(ok, ) = ctrl.genericCall(
|
|
174
|
+
address(reserve),
|
|
175
|
+
abi.encodeCall(ERC20PresetMinterPauserUpgradeable.unpause, ()),
|
|
176
|
+
address(avatar),
|
|
177
|
+
0
|
|
178
|
+
);
|
|
179
|
+
require(ok, "unpause failed");
|
|
180
|
+
}
|
|
157
181
|
}
|
package/hardhat.config.ts
CHANGED
|
@@ -211,14 +211,14 @@ const hhconfig: HardhatUserConfig = {
|
|
|
211
211
|
accounts: [deployerPrivateKey],
|
|
212
212
|
url: "https://forno.celo.org",
|
|
213
213
|
gas: 8000000,
|
|
214
|
-
gasPrice:
|
|
214
|
+
gasPrice: 25e9,
|
|
215
215
|
chainId: 42220
|
|
216
216
|
},
|
|
217
217
|
celo: {
|
|
218
218
|
accounts: { mnemonic },
|
|
219
219
|
url: "https://forno.celo.org",
|
|
220
220
|
gas: 3000000,
|
|
221
|
-
gasPrice:
|
|
221
|
+
gasPrice: 25e9,
|
|
222
222
|
chainId: 42220
|
|
223
223
|
},
|
|
224
224
|
alfajores: {
|
|
@@ -237,14 +237,14 @@ const hhconfig: HardhatUserConfig = {
|
|
|
237
237
|
accounts: { mnemonic },
|
|
238
238
|
url: "https://forno.celo.org",
|
|
239
239
|
gas: 3000000,
|
|
240
|
-
gasPrice:
|
|
240
|
+
gasPrice: 25e9,
|
|
241
241
|
chainId: 42220
|
|
242
242
|
},
|
|
243
243
|
"development-celo": {
|
|
244
244
|
accounts: { mnemonic },
|
|
245
245
|
url: "https://forno.celo.org",
|
|
246
246
|
gas: 3000000,
|
|
247
|
-
gasPrice:
|
|
247
|
+
gasPrice: 25e9,
|
|
248
248
|
chainId: 42220
|
|
249
249
|
},
|
|
250
250
|
"development-base": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddollar/goodprotocol",
|
|
3
|
-
"version": "2.0.32
|
|
3
|
+
"version": "2.0.32",
|
|
4
4
|
"description": "GoodDollar Protocol",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16.x"
|
|
@@ -76,12 +76,15 @@
|
|
|
76
76
|
"@mean-finance/uniswap-v3-oracle": "^1.0.3",
|
|
77
77
|
"@nomicfoundation/hardhat-chai-matchers": "1",
|
|
78
78
|
"@nomicfoundation/hardhat-network-helpers": "^1.0.8",
|
|
79
|
-
"@nomicfoundation/hardhat-verify": "
|
|
79
|
+
"@nomicfoundation/hardhat-verify": "2",
|
|
80
80
|
"@nomiclabs/hardhat-ethers": "^2.2.1",
|
|
81
81
|
"@nomiclabs/hardhat-waffle": "^2.0.6",
|
|
82
82
|
"@openzeppelin/contracts": "^4.8.0",
|
|
83
83
|
"@openzeppelin/contracts-upgradeable": "^4.8.0",
|
|
84
84
|
"@openzeppelin/hardhat-upgrades": "^1.22.1",
|
|
85
|
+
"@safe-global/api-kit": "^3.0.1",
|
|
86
|
+
"@safe-global/protocol-kit": "^6.0.2",
|
|
87
|
+
"@safe-global/types-kit": "^2.0.1",
|
|
85
88
|
"@superfluid-finance/ethereum-contracts": "1.8.1",
|
|
86
89
|
"@superfluid-finance/sdk-core": "^0.5.8",
|
|
87
90
|
"@swc/core": "1.3.96",
|
package/releases/deployment.json
CHANGED
|
@@ -436,11 +436,13 @@
|
|
|
436
436
|
"BuyGDFactoryV2": "0x1F60C4C7037C6766924A43666B781ED1479587a2",
|
|
437
437
|
"CUSD": "0x765DE816845861e75A25fCA122bb6898B8B1282a",
|
|
438
438
|
"BulkWhitelist": "0x30Afd0534dAA29135308d048103b40dc1BA4518d",
|
|
439
|
-
"MentoProxyAdmin": "
|
|
440
|
-
"MentoExchangeProvider": "
|
|
441
|
-
"MentoExpansionController": "
|
|
442
|
-
"MentoReserve": "
|
|
443
|
-
"MentoBroker": "
|
|
439
|
+
"MentoProxyAdmin": "0x8471406C3Bff67Cc6538481C8550364bda6Ca691",
|
|
440
|
+
"MentoExchangeProvider": "0x2fFBB49055d487DdBBb0C052Cd7c2a02A7971e41",
|
|
441
|
+
"MentoExpansionController": "0x5557E9dEF86ad6564462741a7A3f3679C1223f5d",
|
|
442
|
+
"MentoReserve": "0x94A3240f484A04F5e3d524f528d02694c109463b",
|
|
443
|
+
"MentoBroker": "0x88de45906D4F5a57315c133620cfa484cB297541",
|
|
444
|
+
"MentoUpgradeHelper": "0xc413cC6C58f0c290e89ddAeC83c2590017985eb7",
|
|
445
|
+
"CeloDistributionHelper": "0x6B845eFfAf36c374e8E7cf543Efa680f2F71F098"
|
|
444
446
|
},
|
|
445
447
|
"gnosis": { "GuardiansSafe": "0x84c10b45fe51bfb4f86c19a47fdbc187d4572fb8" },
|
|
446
448
|
"development-celo": {
|
|
@@ -2,10 +2,14 @@ import { Contract, ContractFactory, Signer } from "ethers";
|
|
|
2
2
|
import { network, ethers, upgrades, run } from "hardhat";
|
|
3
3
|
import * as safeethers from "ethers";
|
|
4
4
|
import { TransactionResponse, TransactionReceipt } from "@ethersproject/providers";
|
|
5
|
-
import Safe from "@gnosis.pm/safe-core-sdk";
|
|
5
|
+
// import Safe from "@gnosis.pm/safe-core-sdk";
|
|
6
6
|
import EthersAdapter from "@gnosis.pm/safe-ethers-lib";
|
|
7
|
-
import { MetaTransactionData } from "@gnosis.pm/safe-core-sdk-types";
|
|
8
|
-
import SafeClient from "@gnosis.pm/safe-service-client";
|
|
7
|
+
// import { MetaTransactionData } from "@gnosis.pm/safe-core-sdk-types";
|
|
8
|
+
// import SafeClient from "@gnosis.pm/safe-service-client";
|
|
9
|
+
|
|
10
|
+
import SafeApiKit from "@safe-global/api-kit";
|
|
11
|
+
import Safe, { Eip1193Provider } from "@safe-global/protocol-kit";
|
|
12
|
+
import { MetaTransactionData, OperationType } from "@safe-global/types-kit";
|
|
9
13
|
|
|
10
14
|
import util from "util";
|
|
11
15
|
import dao from "../../releases/deployment.json";
|
|
@@ -248,27 +252,36 @@ export const executeViaSafe = async (
|
|
|
248
252
|
throw new Error("safe signer is missing");
|
|
249
253
|
}
|
|
250
254
|
|
|
251
|
-
let safeSigner = new ethers.Wallet(
|
|
255
|
+
// let safeSigner = new ethers.Wallet(
|
|
256
|
+
// process.env.SAFEOWNER_PRIVATE_KEY,
|
|
257
|
+
// new ethers.providers.JsonRpcProvider("https://rpc.flashbots.net")
|
|
258
|
+
// );
|
|
259
|
+
let chainId = 1;
|
|
260
|
+
let provider = "https://mainnet.infura.io";
|
|
252
261
|
if (typeof safeSignerOrNetwork === "string") {
|
|
253
262
|
switch (safeSignerOrNetwork) {
|
|
254
263
|
case "mainnet":
|
|
255
264
|
break;
|
|
256
265
|
case "celo":
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
)
|
|
266
|
+
chainId = 42220;
|
|
267
|
+
provider = "https://forno.celo.org";
|
|
268
|
+
// safeSigner = new ethers.Wallet(process.env.SAFEOWNER_PRIVATE_KEY).connect(
|
|
269
|
+
// new ethers.providers.JsonRpcProvider("https://forno.celo.org")
|
|
270
|
+
// );
|
|
260
271
|
break;
|
|
261
272
|
case "fuse":
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
)
|
|
273
|
+
chainId = 122;
|
|
274
|
+
provider = "https://rpc.fuse.io";
|
|
275
|
+
// safeSigner = new ethers.Wallet(process.env.SAFEOWNER_PRIVATE_KEY).connect(
|
|
276
|
+
// new ethers.providers.JsonRpcProvider("https://rpc.fuse.io")
|
|
277
|
+
// );
|
|
265
278
|
break;
|
|
266
279
|
}
|
|
267
280
|
} else if (safeSignerOrNetwork) {
|
|
268
|
-
safeSigner = safeSignerOrNetwork as any;
|
|
281
|
+
// safeSigner = safeSignerOrNetwork as any;
|
|
269
282
|
}
|
|
270
|
-
|
|
271
|
-
console.log("safeSigner:",
|
|
283
|
+
|
|
284
|
+
console.log("safeSigner:", { chainId, safeAddress });
|
|
272
285
|
let txServiceUrl;
|
|
273
286
|
switch (chainId) {
|
|
274
287
|
case 1:
|
|
@@ -282,18 +295,26 @@ export const executeViaSafe = async (
|
|
|
282
295
|
break;
|
|
283
296
|
}
|
|
284
297
|
console.log("creating safe adapter", { txServiceUrl });
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
signerOrProvider: safeSigner
|
|
298
|
+
const safeService = new SafeApiKit({
|
|
299
|
+
chainId: BigInt(chainId)
|
|
288
300
|
});
|
|
289
|
-
console.log("creating safe client", { txServiceUrl });
|
|
290
301
|
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
|
|
302
|
+
const safeSdk = await Safe.init({
|
|
303
|
+
provider,
|
|
304
|
+
signer: process.env.SAFEOWNER_PRIVATE_KEY,
|
|
305
|
+
safeAddress
|
|
294
306
|
});
|
|
295
307
|
|
|
296
|
-
const
|
|
308
|
+
const senderAddress = await safeSdk.getSafeProvider().getSignerAddress();
|
|
309
|
+
|
|
310
|
+
// console.log("creating safe client", { txServiceUrl });
|
|
311
|
+
|
|
312
|
+
// const safeService = new SafeClient({
|
|
313
|
+
// txServiceUrl,
|
|
314
|
+
// ethAdapter
|
|
315
|
+
// });
|
|
316
|
+
|
|
317
|
+
// const safeSdk = await Safe.create({ ethAdapter, safeAddress });
|
|
297
318
|
|
|
298
319
|
let release: { [key: string]: any } = dao[networkName];
|
|
299
320
|
const ctrl = await ethers.getContractAt("Controller", release.Controller, null);
|
|
@@ -374,13 +395,13 @@ export const executeViaSafe = async (
|
|
|
374
395
|
}
|
|
375
396
|
|
|
376
397
|
const safeTransaction = await safeSdk.createTransaction({
|
|
377
|
-
safeTransactionData
|
|
398
|
+
transactions: safeTransactionData
|
|
378
399
|
});
|
|
379
400
|
|
|
380
401
|
const safeTxHash = await safeSdk.getTransactionHash(safeTransaction);
|
|
381
|
-
const signedHash = await safeSdk.
|
|
402
|
+
const signedHash = await safeSdk.signHash(safeTxHash);
|
|
382
403
|
|
|
383
|
-
const senderAddress = await safeSigner.getAddress();
|
|
404
|
+
// const senderAddress = await safeSigner.getAddress();
|
|
384
405
|
console.log("propose safe transaction", {
|
|
385
406
|
safeAddress,
|
|
386
407
|
safeTransactionData: safeTransaction.data,
|