@gooddollar/goodprotocol 2.0.25-beta.9 → 2.0.26-beta.0
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/AdminWallet.min.json +1 -1
- package/artifacts/abis/CompoundVotingMachine.min.json +1 -1
- package/artifacts/abis/DistributionHelper.min.json +1 -1
- package/artifacts/abis/DistributionHelperTest.min.json +1 -1
- package/artifacts/abis/DistributionHelperTestHelper.min.json +1 -1
- package/artifacts/abis/EternalStorage.min.json +1 -0
- package/artifacts/abis/FuseOldBridgeKill.min.json +1 -0
- package/artifacts/abis/GoodFundManager.min.json +1 -1
- package/artifacts/abis/GoodFundManagerTest.min.json +1 -1
- package/artifacts/abis/GoodMarketMaker.min.json +1 -1
- package/artifacts/abis/GoodReserveCDai.min.json +1 -1
- package/artifacts/abis/IQuoterV2.min.json +1 -1
- package/artifacts/abis/ISwapRouter.min.json +1 -1
- package/artifacts/abis/IUpgradeabilityOwnerStorage.min.json +1 -0
- package/artifacts/abis/Initializable.min.json +1 -0
- package/artifacts/abis/Ownable.min.json +1 -0
- package/artifacts/abis/ReserveRestore.min.json +1 -0
- package/artifacts/abis/SuperfluidFaucet.min.json +1 -0
- package/artifacts/abis/Upgradeable.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 +4 -0
- package/artifacts/contracts/{utils/BuyGDClone.sol → Interfaces.sol}/IQuoterV2.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ISwapRouter.dbg.json +4 -0
- package/artifacts/contracts/{utils/BuyGDClone.sol → Interfaces.sol}/ISwapRouter.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/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.json +2 -2
- package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.json +2 -2
- package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.json +2 -2
- package/artifacts/contracts/fuseFaucet/SuperfluidFacuet.sol/SuperfluidFaucet.dbg.json +4 -0
- package/artifacts/contracts/fuseFaucet/SuperfluidFacuet.sol/SuperfluidFaucet.json +536 -0
- package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
- package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.json +2 -2
- package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
- package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.json +20 -2
- package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
- package/artifacts/contracts/governance/GReputation.sol/GReputation.json +2 -2
- 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/GovernanceStaking.sol/GovernanceStaking.json +2 -2
- 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/Reputation.sol/Reputation.json +2 -2
- 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/identity/IdentityV2.sol/IdentityV2.json +2 -2
- package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.json +2 -2
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.json +2 -2
- package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.json +2 -2
- package/artifacts/contracts/invite/OneTimeReward.sol/OneTimeReward.dbg.json +1 -1
- package/artifacts/contracts/invite/OneTimeReward.sol/OneTimeReward.json +2 -2
- 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/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/DistributionHelperTest.json +21 -2
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.json +21 -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/GoodDollarStakingMock.sol/GoodDollarStakingMock.json +2 -2
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.json +21 -2
- package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.json +2 -2
- 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/OverMintTester.sol/OverMintTester.json +2 -2
- 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/SwapHelperTest.sol/SwapHelperTest.json +2 -2
- 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/UpgradableMock.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.json +2 -2
- 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/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.json +21 -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 +6 -6
- 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 +3 -3
- package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.json +2 -2
- package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.json +2 -2
- 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/FuseStakingV3.json +2 -2
- 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 +21 -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/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.json +2 -2
- 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/GoodDollar.sol/GoodDollar.json +2 -2
- 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/SuperGoodDollar.sol/SuperGoodDollar.json +2 -2
- 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/UBIScheme.sol/UBIScheme.json +2 -2
- package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.json +2 -2
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.json +2 -22
- package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.json +2 -2
- 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/BulkWhitelist.sol/BulkWhitelist.json +2 -2
- 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/BuyGDClone.json +2 -2
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.json +2 -2
- package/artifacts/contracts/utils/BuyGDClone.sol/DonateGDClone.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/DonateGDClone.json +2 -2
- package/artifacts/contracts/utils/DAOContract.sol/DAOContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOContract.sol/DAOContract.json +2 -2
- package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.json +2 -2
- 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 +4 -0
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/EternalStorage.json +10 -0
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/FuseOldBridgeKill.dbg.json +4 -0
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/FuseOldBridgeKill.json +31 -0
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/IUpgradeabilityOwnerStorage.dbg.json +4 -0
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/IUpgradeabilityOwnerStorage.json +24 -0
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Initializable.dbg.json +4 -0
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Initializable.json +24 -0
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Ownable.dbg.json +4 -0
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Ownable.json +56 -0
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Upgradeable.dbg.json +4 -0
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Upgradeable.json +10 -0
- package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.dbg.json +1 -1
- package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.json +2 -2
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.json +2 -2
- 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/GoodDollarMintBurnWrapper.sol/TokenOperation.json +2 -2
- package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.dbg.json +1 -1
- package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.json +2 -2
- 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/MultichainBridgeHelper.sol/MultichainBridgeHelper.json +2 -2
- 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/OneTimePayments.sol/OneTimePayments.json +2 -2
- package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.json +2 -2
- 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/ProtocolUpgrade.sol/ProtocolUpgrade.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.json +2 -2
- 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/ReputationTestHelper.sol/ReputationTestHelper.json +2 -2
- package/artifacts/contracts/utils/ReserveRestore.sol/ReserveRestore.dbg.json +4 -0
- package/artifacts/contracts/utils/ReserveRestore.sol/ReserveRestore.json +91 -0
- package/contracts/Interfaces.sol +122 -0
- package/contracts/fuseFaucet/SuperfluidFacuet.sol +129 -0
- package/contracts/governance/CompoundVotingMachine.sol +26 -11
- package/contracts/governance/StakersDistribution.sol +13 -13
- package/contracts/reserve/DistributionHelper.sol +29 -10
- package/contracts/reserve/ExchangeHelper.sol +16 -7
- package/contracts/reserve/GoodMarketMaker.sol +43 -53
- package/contracts/reserve/GoodReserveCDai.sol +44 -16
- package/contracts/staking/GoodFundManager.sol +44 -4
- package/contracts/utils/AdminWallet.sol +4 -6
- package/contracts/utils/BuyGDClone.sol +0 -122
- package/contracts/utils/FuseOldBridgeKill.sol +123 -0
- package/contracts/utils/ReserveRestore.sol +157 -0
- package/dist/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.json +2 -2
- package/dist/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +2 -2
- package/hardhat.config.ts +21 -39
- package/package.json +3 -3
- package/releases/deployment.json +6 -0
- package/scripts/multichain-deploy/0_proxyFactory-deploy.ts +20 -15
- package/scripts/multichain-deploy/7_superfluidfaucet-deploy.ts +95 -0
- package/scripts/multichain-deploy/helpers.ts +8 -8
- package/scripts/proposals/reserveRestore.ts +429 -0
- package/scripts/test/localOldDaoDeploy.ts +2 -1
- package/test/governance/CompoundVotingMachine.daoscheme.ts +3 -0
- package/test/governance/CompoundVotingMachine.guardian.test.ts +76 -21
- package/test/governance/CompoundVotingMachine.state.test.ts +31 -28
- package/test/governance/StakersDistribution.test.ts +79 -5
- package/test/helpers.ts +7 -0
- package/test/reserve/DistributionHelper.test.ts +10 -10
- package/test/reserve/GoodMarketMaker.test.ts +75 -26
- package/test/staking/StakingRewards.test.ts +106 -29
- package/test/utils/ProtocolUpgrade.test.ts +1 -0
- package/types/contracts/{utils/BuyGDClone.sol → Interfaces.sol}/IQuoterV2.ts +1 -1
- package/types/contracts/{utils/BuyGDClone.sol → Interfaces.sol}/ISwapRouter.ts +1 -1
- package/types/contracts/Interfaces.sol/index.ts +2 -0
- package/types/contracts/fuseFaucet/SuperfluidFacuet.sol/SuperfluidFaucet.ts +867 -0
- package/types/contracts/fuseFaucet/SuperfluidFacuet.sol/index.ts +4 -0
- package/types/contracts/fuseFaucet/index.ts +2 -0
- package/types/contracts/governance/CompoundVotingMachine.ts +44 -3
- package/types/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.ts +35 -0
- package/types/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.ts +35 -0
- package/types/contracts/mocks/GoodFundManagerTest.ts +35 -0
- package/types/contracts/reserve/DistributionHelper.ts +35 -0
- package/types/contracts/reserve/GoodMarketMaker.ts +3 -3
- package/types/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.ts +5 -5
- package/types/contracts/staking/GoodFundManager.ts +35 -0
- package/types/contracts/utils/AdminWallet.ts +0 -34
- package/types/contracts/utils/BuyGDClone.sol/index.ts +0 -2
- package/types/contracts/utils/FuseOldBridgeKill.sol/FuseOldBridgeKill.ts +108 -0
- package/types/contracts/utils/FuseOldBridgeKill.sol/IUpgradeabilityOwnerStorage.ts +89 -0
- package/types/contracts/utils/FuseOldBridgeKill.sol/Initializable.ts +87 -0
- package/types/contracts/utils/FuseOldBridgeKill.sol/Ownable.ts +148 -0
- package/types/contracts/utils/FuseOldBridgeKill.sol/index.ts +7 -0
- package/types/contracts/utils/ReserveRestore.ts +201 -0
- package/types/contracts/utils/index.ts +3 -0
- package/types/factories/contracts/{utils/BuyGDClone.sol → Interfaces.sol}/IQuoterV2__factory.ts +1 -1
- package/types/factories/contracts/{utils/BuyGDClone.sol → Interfaces.sol}/ISwapRouter__factory.ts +1 -1
- package/types/factories/contracts/Interfaces.sol/index.ts +2 -0
- package/types/factories/contracts/fuseFaucet/Faucet__factory.ts +1 -1
- package/types/factories/contracts/fuseFaucet/FuseFaucetV2__factory.ts +1 -1
- package/types/factories/contracts/fuseFaucet/FuseFaucet__factory.ts +1 -1
- package/types/factories/contracts/fuseFaucet/SuperfluidFacuet.sol/SuperfluidFaucet__factory.ts +587 -0
- package/types/factories/contracts/fuseFaucet/SuperfluidFacuet.sol/index.ts +4 -0
- package/types/factories/contracts/fuseFaucet/index.ts +1 -0
- package/types/factories/contracts/governance/ClaimersDistribution__factory.ts +1 -1
- package/types/factories/contracts/governance/CompoundVotingMachine__factory.ts +19 -1
- package/types/factories/contracts/governance/GReputation__factory.ts +1 -1
- package/types/factories/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking__factory.ts +1 -1
- package/types/factories/contracts/governance/GovernanceStaking__factory.ts +1 -1
- package/types/factories/contracts/governance/Reputation__factory.ts +1 -1
- package/types/factories/contracts/governance/StakersDistribution__factory.ts +1 -1
- package/types/factories/contracts/identity/IdentityV2__factory.ts +1 -1
- package/types/factories/contracts/invite/InvitesFuseV2__factory.ts +1 -1
- package/types/factories/contracts/invite/InvitesV1__factory.ts +1 -1
- package/types/factories/contracts/invite/InvitesV2__factory.ts +1 -1
- package/types/factories/contracts/invite/OneTimeReward__factory.ts +1 -1
- package/types/factories/contracts/mocks/DistributionBridgeMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper__factory.ts +20 -1
- package/types/factories/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest__factory.ts +20 -1
- package/types/factories/contracts/mocks/GoodCompoundStakingTest__factory.ts +1 -1
- package/types/factories/contracts/mocks/GoodDollarStakingMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/GoodFundManagerTest__factory.ts +20 -1
- package/types/factories/contracts/mocks/IdentityMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/OverMintTester.sol/OverMintTester__factory.ts +1 -1
- package/types/factories/contracts/mocks/OverMintTesterRegularStake__factory.ts +1 -1
- package/types/factories/contracts/mocks/SwapHelperTest__factory.ts +1 -1
- package/types/factories/contracts/mocks/UpgradableMocks.sol/UpgradableMock2__factory.ts +1 -1
- package/types/factories/contracts/mocks/UpgradableMocks.sol/UpgradableMock3__factory.ts +1 -1
- package/types/factories/contracts/mocks/UpgradableMocks.sol/UpgradableMock4__factory.ts +1 -1
- package/types/factories/contracts/mocks/UpgradableMocks.sol/UpgradableMock__factory.ts +1 -1
- package/types/factories/contracts/reserve/DistributionHelper__factory.ts +20 -1
- package/types/factories/contracts/reserve/ExchangeHelper__factory.ts +1 -1
- package/types/factories/contracts/reserve/GoodMarketMaker__factory.ts +5 -5
- package/types/factories/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai__factory.ts +2 -2
- package/types/factories/contracts/staking/BaseShareFieldV2__factory.ts +1 -1
- package/types/factories/contracts/staking/BaseShareField__factory.ts +1 -1
- package/types/factories/contracts/staking/DonationsStaking__factory.ts +1 -1
- package/types/factories/contracts/staking/FuseStakingV3.sol/FuseStakingV3__factory.ts +1 -1
- package/types/factories/contracts/staking/GoodFundManager__factory.ts +20 -1
- package/types/factories/contracts/staking/UniswapV2SwapHelper__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/token/GoodDollar__factory.ts +1 -1
- package/types/factories/contracts/token/superfluid/SuperGoodDollar__factory.ts +1 -1
- package/types/factories/contracts/ubi/UBISchemeV2__factory.ts +1 -1
- package/types/factories/contracts/ubi/UBIScheme__factory.ts +1 -1
- package/types/factories/contracts/utils/AdminWalletFuse__factory.ts +1 -1
- package/types/factories/contracts/utils/AdminWallet__factory.ts +1 -21
- package/types/factories/contracts/utils/BulkWhitelist__factory.ts +1 -1
- package/types/factories/contracts/utils/BuyAndBridgeHelper__factory.ts +1 -1
- package/types/factories/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory__factory.ts +1 -1
- package/types/factories/contracts/utils/BuyGDClone.sol/BuyGDClone__factory.ts +1 -1
- package/types/factories/contracts/utils/BuyGDClone.sol/DonateGDClone__factory.ts +1 -1
- package/types/factories/contracts/utils/BuyGDClone.sol/index.ts +0 -2
- package/types/factories/contracts/utils/DAOContract__factory.ts +1 -1
- package/types/factories/contracts/utils/DAOUpgradeableContract__factory.ts +1 -1
- package/types/factories/contracts/utils/FuseOldBridgeKill.sol/FuseOldBridgeKill__factory.ts +82 -0
- package/types/factories/contracts/utils/FuseOldBridgeKill.sol/IUpgradeabilityOwnerStorage__factory.ts +43 -0
- package/types/factories/contracts/utils/FuseOldBridgeKill.sol/Initializable__factory.ts +75 -0
- package/types/factories/contracts/utils/FuseOldBridgeKill.sol/Ownable__factory.ts +105 -0
- package/types/factories/contracts/utils/FuseOldBridgeKill.sol/index.ts +7 -0
- package/types/factories/contracts/utils/GDFaucet__factory.ts +1 -1
- package/types/factories/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper__factory.ts +1 -1
- package/types/factories/contracts/utils/IdentityFix__factory.ts +1 -1
- package/types/factories/contracts/utils/LastauthReduction__factory.ts +1 -1
- package/types/factories/contracts/utils/MultichainBridgeHelper__factory.ts +1 -1
- package/types/factories/contracts/utils/OneTimePaymentsV2__factory.ts +1 -1
- package/types/factories/contracts/utils/OneTimePayments__factory.ts +1 -1
- package/types/factories/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade__factory.ts +1 -1
- package/types/factories/contracts/utils/ProtocolUpgradeFuseRecover__factory.ts +1 -1
- package/types/factories/contracts/utils/ProtocolUpgradeFuse__factory.ts +1 -1
- package/types/factories/contracts/utils/ProtocolUpgradeRecover__factory.ts +1 -1
- package/types/factories/contracts/utils/ReputationTestHelper__factory.ts +1 -1
- package/types/factories/contracts/utils/ReserveRestore__factory.ts +144 -0
- package/types/factories/contracts/utils/index.ts +2 -0
- package/types/hardhat.d.ts +70 -16
- package/types/index.ts +12 -4
- package/artifacts/contracts/utils/BuyGDClone.sol/IQuoterV2.dbg.json +0 -4
- package/artifacts/contracts/utils/BuyGDClone.sol/ISwapRouter.dbg.json +0 -4
|
@@ -32,6 +32,13 @@ contract GoodFundManager is DAOUpgradeableContract, DSMath {
|
|
|
32
32
|
//address of the active staking contracts
|
|
33
33
|
address[] public activeContracts;
|
|
34
34
|
|
|
35
|
+
// Rewards per block for particular Staking contract
|
|
36
|
+
mapping(address => Reward) public rewardsForStakingContract;
|
|
37
|
+
|
|
38
|
+
uint256 private _reentrantStatus;
|
|
39
|
+
|
|
40
|
+
/** ADD NEW VARIABLES AFTER THIS LINE **/
|
|
41
|
+
|
|
35
42
|
event GasCostSet(uint256 newGasCost);
|
|
36
43
|
event CollectInterestTimeThresholdSet(
|
|
37
44
|
uint256 newCollectInterestTimeThreshold
|
|
@@ -62,8 +69,7 @@ contract GoodFundManager is DAOUpgradeableContract, DSMath {
|
|
|
62
69
|
uint256 maxGasAmountSoFar; // Max gas amount that can spend to collect this interest according to interest amount
|
|
63
70
|
bool maxGasLargerOrEqualRequired; // Bool that indicates if max gas amount larger or equal to actual gas needed
|
|
64
71
|
}
|
|
65
|
-
|
|
66
|
-
mapping(address => Reward) public rewardsForStakingContract;
|
|
72
|
+
|
|
67
73
|
// Emits when `transferInterest` transfers
|
|
68
74
|
// funds to the staking contract and to
|
|
69
75
|
// the bridge
|
|
@@ -221,7 +227,7 @@ contract GoodFundManager is DAOUpgradeableContract, DSMath {
|
|
|
221
227
|
function collectInterest(
|
|
222
228
|
address[] calldata _stakingContracts,
|
|
223
229
|
bool _forceAndWaiverRewards
|
|
224
|
-
) external {
|
|
230
|
+
) external nonReentrant {
|
|
225
231
|
uint256 initialGas = gasleft();
|
|
226
232
|
uint256 gdUBI;
|
|
227
233
|
uint256 interestInCdai;
|
|
@@ -242,6 +248,10 @@ contract GoodFundManager is DAOUpgradeableContract, DSMath {
|
|
|
242
248
|
// elements are sorted by balances from lowest to highest
|
|
243
249
|
|
|
244
250
|
if (_stakingContracts[i - 1] != address(0x0)) {
|
|
251
|
+
require(
|
|
252
|
+
isActiveContract(_stakingContracts[i - 1]),
|
|
253
|
+
"collectInterest: not a dao contract"
|
|
254
|
+
);
|
|
245
255
|
IGoodStaking(_stakingContracts[i - 1]).collectUBIInterest(
|
|
246
256
|
reserveAddress
|
|
247
257
|
);
|
|
@@ -277,7 +287,11 @@ contract GoodFundManager is DAOUpgradeableContract, DSMath {
|
|
|
277
287
|
if (
|
|
278
288
|
block.timestamp >= lastCollectedInterest + collectInterestTimeThreshold
|
|
279
289
|
) {
|
|
280
|
-
require(
|
|
290
|
+
require(
|
|
291
|
+
interestInCdai >= gasPriceIncDAI ||
|
|
292
|
+
gdUBI >= interestMultiplier * gdRewardToMint,
|
|
293
|
+
"UBI < gas costs"
|
|
294
|
+
); // This require is necessary to keeper can not abuse this function
|
|
281
295
|
} else {
|
|
282
296
|
require(
|
|
283
297
|
interestInCdai >= interestMultiplier * gasPriceIncDAI ||
|
|
@@ -299,6 +313,20 @@ contract GoodFundManager is DAOUpgradeableContract, DSMath {
|
|
|
299
313
|
lastCollectedInterestBlock = block.number;
|
|
300
314
|
}
|
|
301
315
|
|
|
316
|
+
/**
|
|
317
|
+
* @dev verifies that contract was added to the approved staking contracts in the past, and is not blacklisted
|
|
318
|
+
* @param _contract address of the contract
|
|
319
|
+
* @return isActive true if contract is active
|
|
320
|
+
**/
|
|
321
|
+
function isActiveContract(
|
|
322
|
+
address _contract
|
|
323
|
+
) public view returns (bool isActive) {
|
|
324
|
+
return
|
|
325
|
+
!rewardsForStakingContract[_contract].isBlackListed &&
|
|
326
|
+
(rewardsForStakingContract[_contract].blockStart > 0 ||
|
|
327
|
+
rewardsForStakingContract[_contract].blockEnd > 0);
|
|
328
|
+
}
|
|
329
|
+
|
|
302
330
|
/**
|
|
303
331
|
* @dev Function that get interest informations of staking contracts in the sorted array by highest interest to lowest interest amount
|
|
304
332
|
* @return array of interestInfo struct
|
|
@@ -467,4 +495,16 @@ contract GoodFundManager is DAOUpgradeableContract, DSMath {
|
|
|
467
495
|
function getActiveContractsCount() public view returns (uint256) {
|
|
468
496
|
return activeContracts.length;
|
|
469
497
|
}
|
|
498
|
+
|
|
499
|
+
modifier nonReentrant() {
|
|
500
|
+
// On the first call to nonReentrant, _status will be _NOT_ENTERED
|
|
501
|
+
require(_reentrantStatus != 1, "ReentrancyGuard: reentrant call");
|
|
502
|
+
|
|
503
|
+
// Any calls to nonReentrant after this point will fail
|
|
504
|
+
_reentrantStatus = 1;
|
|
505
|
+
_;
|
|
506
|
+
// By storing the original value once again, a refund is triggered (see
|
|
507
|
+
// https://eips.ethereum.org/EIPS/eip-2200)
|
|
508
|
+
_reentrantStatus = 0;
|
|
509
|
+
}
|
|
470
510
|
}
|
|
@@ -34,7 +34,8 @@ contract AdminWallet is
|
|
|
34
34
|
uint64 public maxDailyNewWallets;
|
|
35
35
|
uint64 public day;
|
|
36
36
|
|
|
37
|
-
ERC20
|
|
37
|
+
ERC20 private gd_removed;
|
|
38
|
+
|
|
38
39
|
mapping(address => uint256) public lastGdBalance; // only top non whitelisted if active G$ users
|
|
39
40
|
|
|
40
41
|
event AdminsAdded(address payable[] indexed admins);
|
|
@@ -66,7 +67,6 @@ contract AdminWallet is
|
|
|
66
67
|
addAdmins(_admins);
|
|
67
68
|
}
|
|
68
69
|
if (msg.sender != _owner) revokeRole(DEFAULT_ADMIN_ROLE, msg.sender);
|
|
69
|
-
gd = ERC20(nameService.getAddress("GOODDOLLAR"));
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
modifier onlyOwner() {
|
|
@@ -74,10 +74,6 @@ contract AdminWallet is
|
|
|
74
74
|
_;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
function upgrade() public onlyOwner {
|
|
78
|
-
gd = ERC20(nameService.getAddress("GOODDOLLAR"));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
77
|
function getIdentity() public view returns (IIdentityV2) {
|
|
82
78
|
return IIdentityV2(nameService.getAddress("IDENTITY"));
|
|
83
79
|
}
|
|
@@ -236,6 +232,8 @@ contract AdminWallet is
|
|
|
236
232
|
* @param _user The address to transfer to
|
|
237
233
|
*/
|
|
238
234
|
function topWallet(address payable _user) public onlyAdmin reimburseGas {
|
|
235
|
+
ERC20 gd = ERC20(nameService.getAddress("GOODDOLLAR"));
|
|
236
|
+
|
|
239
237
|
uint256 gdBalance = gd.balanceOf(_user);
|
|
240
238
|
require(
|
|
241
239
|
getIdentity().isWhitelisted(_user) || gdBalance != lastGdBalance[_user],
|
|
@@ -6,128 +6,6 @@ import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
|
|
|
6
6
|
import "@mean-finance/uniswap-v3-oracle/solidity/interfaces/IStaticOracle.sol";
|
|
7
7
|
import "../Interfaces.sol";
|
|
8
8
|
|
|
9
|
-
// @uniswap/v3-core
|
|
10
|
-
interface ISwapRouter {
|
|
11
|
-
struct ExactInputSingleParams {
|
|
12
|
-
address tokenIn;
|
|
13
|
-
address tokenOut;
|
|
14
|
-
uint24 fee;
|
|
15
|
-
address recipient;
|
|
16
|
-
uint256 amountIn;
|
|
17
|
-
uint256 amountOutMinimum;
|
|
18
|
-
uint160 sqrtPriceLimitX96;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/// @notice Swaps `amountIn` of one token for as much as possible of another token
|
|
22
|
-
/// @dev Setting `amountIn` to 0 will cause the contract to look up its own balance,
|
|
23
|
-
/// and swap the entire amount, enabling contracts to send tokens before calling this function.
|
|
24
|
-
/// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
|
|
25
|
-
/// @return amountOut The amount of the received token
|
|
26
|
-
function exactInputSingle(
|
|
27
|
-
ExactInputSingleParams calldata params
|
|
28
|
-
) external payable returns (uint256 amountOut);
|
|
29
|
-
|
|
30
|
-
struct ExactInputParams {
|
|
31
|
-
bytes path;
|
|
32
|
-
address recipient;
|
|
33
|
-
uint256 amountIn;
|
|
34
|
-
uint256 amountOutMinimum;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
|
|
38
|
-
/// @dev Setting `amountIn` to 0 will cause the contract to look up its own balance,
|
|
39
|
-
/// and swap the entire amount, enabling contracts to send tokens before calling this function.
|
|
40
|
-
/// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
|
|
41
|
-
/// @return amountOut The amount of the received token
|
|
42
|
-
function exactInput(
|
|
43
|
-
ExactInputParams calldata params
|
|
44
|
-
) external payable returns (uint256 amountOut);
|
|
45
|
-
|
|
46
|
-
struct ExactOutputSingleParams {
|
|
47
|
-
address tokenIn;
|
|
48
|
-
address tokenOut;
|
|
49
|
-
uint24 fee;
|
|
50
|
-
address recipient;
|
|
51
|
-
uint256 amountOut;
|
|
52
|
-
uint256 amountInMaximum;
|
|
53
|
-
uint160 sqrtPriceLimitX96;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/// @notice Swaps as little as possible of one token for `amountOut` of another token
|
|
57
|
-
/// that may remain in the router after the swap.
|
|
58
|
-
/// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
|
|
59
|
-
/// @return amountIn The amount of the input token
|
|
60
|
-
function exactOutputSingle(
|
|
61
|
-
ExactOutputSingleParams calldata params
|
|
62
|
-
) external payable returns (uint256 amountIn);
|
|
63
|
-
|
|
64
|
-
struct ExactOutputParams {
|
|
65
|
-
bytes path;
|
|
66
|
-
address recipient;
|
|
67
|
-
uint256 amountOut;
|
|
68
|
-
uint256 amountInMaximum;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
|
|
72
|
-
/// that may remain in the router after the swap.
|
|
73
|
-
/// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
|
|
74
|
-
/// @return amountIn The amount of the input token
|
|
75
|
-
function exactOutput(
|
|
76
|
-
ExactOutputParams calldata params
|
|
77
|
-
) external payable returns (uint256 amountIn);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
interface IQuoterV2 {
|
|
81
|
-
/// @notice Returns the amount out received for a given exact input swap without executing the swap
|
|
82
|
-
/// @param path The path of the swap, i.e. each token pair and the pool fee
|
|
83
|
-
/// @param amountIn The amount of the first token to swap
|
|
84
|
-
/// @return amountOut The amount of the last token that would be received
|
|
85
|
-
/// @return sqrtPriceX96AfterList List of the sqrt price after the swap for each pool in the path
|
|
86
|
-
/// @return initializedTicksCrossedList List of the initialized ticks that the swap crossed for each pool in the path
|
|
87
|
-
/// @return gasEstimate The estimate of the gas that the swap consumes
|
|
88
|
-
function quoteExactInput(
|
|
89
|
-
bytes memory path,
|
|
90
|
-
uint256 amountIn
|
|
91
|
-
)
|
|
92
|
-
external
|
|
93
|
-
returns (
|
|
94
|
-
uint256 amountOut,
|
|
95
|
-
uint160[] memory sqrtPriceX96AfterList,
|
|
96
|
-
uint32[] memory initializedTicksCrossedList,
|
|
97
|
-
uint256 gasEstimate
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
struct QuoteExactInputSingleParams {
|
|
101
|
-
address tokenIn;
|
|
102
|
-
address tokenOut;
|
|
103
|
-
uint256 amountIn;
|
|
104
|
-
uint24 fee;
|
|
105
|
-
uint160 sqrtPriceLimitX96;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/// @notice Returns the amount out received for a given exact input but for a swap of a single pool
|
|
109
|
-
/// @param params The params for the quote, encoded as `QuoteExactInputSingleParams`
|
|
110
|
-
/// tokenIn The token being swapped in
|
|
111
|
-
/// tokenOut The token being swapped out
|
|
112
|
-
/// fee The fee of the token pool to consider for the pair
|
|
113
|
-
/// amountIn The desired input amount
|
|
114
|
-
/// sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap
|
|
115
|
-
/// @return amountOut The amount of `tokenOut` that would be received
|
|
116
|
-
/// @return sqrtPriceX96After The sqrt price of the pool after the swap
|
|
117
|
-
/// @return initializedTicksCrossed The number of initialized ticks that the swap crossed
|
|
118
|
-
/// @return gasEstimate The estimate of the gas that the swap consumes
|
|
119
|
-
function quoteExactInputSingle(
|
|
120
|
-
QuoteExactInputSingleParams memory params
|
|
121
|
-
)
|
|
122
|
-
external
|
|
123
|
-
returns (
|
|
124
|
-
uint256 amountOut,
|
|
125
|
-
uint160 sqrtPriceX96After,
|
|
126
|
-
uint32 initializedTicksCrossed,
|
|
127
|
-
uint256 gasEstimate
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
9
|
/*
|
|
132
10
|
* @title BuyGDClone
|
|
133
11
|
* @notice This contract allows users to swap Celo or cUSD for GoodDollar (GD) tokens.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity >=0.8;
|
|
3
|
+
|
|
4
|
+
import "../Interfaces.sol";
|
|
5
|
+
|
|
6
|
+
interface IUpgradeabilityOwnerStorage {
|
|
7
|
+
function upgradeabilityOwner() external view returns (address);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
contract Upgradeable {
|
|
11
|
+
// Avoid using onlyUpgradeabilityOwner name to prevent issues with implementation from proxy contract
|
|
12
|
+
modifier onlyIfUpgradeabilityOwner() {
|
|
13
|
+
require(
|
|
14
|
+
msg.sender ==
|
|
15
|
+
IUpgradeabilityOwnerStorage(address(this)).upgradeabilityOwner()
|
|
16
|
+
);
|
|
17
|
+
/* solcov ignore next */
|
|
18
|
+
_;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @title EternalStorage
|
|
24
|
+
* @dev This contract holds all the necessary state variables to carry out the storage of any contract.
|
|
25
|
+
*/
|
|
26
|
+
contract EternalStorage {
|
|
27
|
+
mapping(bytes32 => uint256) internal uintStorage;
|
|
28
|
+
mapping(bytes32 => string) internal stringStorage;
|
|
29
|
+
mapping(bytes32 => address) internal addressStorage;
|
|
30
|
+
mapping(bytes32 => bytes) internal bytesStorage;
|
|
31
|
+
mapping(bytes32 => bool) internal boolStorage;
|
|
32
|
+
mapping(bytes32 => int256) internal intStorage;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @title Ownable
|
|
37
|
+
* @dev This contract has an owner address providing basic authorization control
|
|
38
|
+
*/
|
|
39
|
+
contract Ownable is EternalStorage {
|
|
40
|
+
bytes4 internal constant UPGRADEABILITY_OWNER = 0x6fde8202; // upgradeabilityOwner()
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @dev Event to show ownership has been transferred
|
|
44
|
+
* @param previousOwner representing the address of the previous owner
|
|
45
|
+
* @param newOwner representing the address of the new owner
|
|
46
|
+
*/
|
|
47
|
+
event OwnershipTransferred(address previousOwner, address newOwner);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @dev Throws if called by any account other than the owner.
|
|
51
|
+
*/
|
|
52
|
+
modifier onlyOwner() {
|
|
53
|
+
require(msg.sender == owner());
|
|
54
|
+
/* solcov ignore next */
|
|
55
|
+
_;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @dev Throws if called by any account other than contract itself or owner.
|
|
60
|
+
*/
|
|
61
|
+
modifier onlyRelevantSender() {
|
|
62
|
+
// proxy owner if used through proxy, address(0) otherwise
|
|
63
|
+
(bool ok, bytes memory addr) = address(this).call(
|
|
64
|
+
abi.encodeWithSelector(UPGRADEABILITY_OWNER)
|
|
65
|
+
);
|
|
66
|
+
address upgowner = abi.decode(addr, (address));
|
|
67
|
+
require(
|
|
68
|
+
(ok && upgowner != address(0)) || // covers usage without calling through storage proxy
|
|
69
|
+
msg.sender ==
|
|
70
|
+
IUpgradeabilityOwnerStorage(address(this)).upgradeabilityOwner() || // covers usage through regular proxy calls
|
|
71
|
+
msg.sender == address(this) // covers calls through upgradeAndCall proxy method
|
|
72
|
+
);
|
|
73
|
+
/* solcov ignore next */
|
|
74
|
+
_;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
bytes32 internal constant OWNER =
|
|
78
|
+
0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0; // keccak256(abi.encodePacked("owner"))
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @dev Tells the address of the owner
|
|
82
|
+
* @return the address of the owner
|
|
83
|
+
*/
|
|
84
|
+
function owner() public view returns (address) {
|
|
85
|
+
return addressStorage[OWNER];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @dev Allows the current owner to transfer control of the contract to a newOwner.
|
|
90
|
+
* @param newOwner the address to transfer ownership to.
|
|
91
|
+
*/
|
|
92
|
+
function transferOwnership(address newOwner) external onlyOwner {
|
|
93
|
+
require(newOwner != address(0));
|
|
94
|
+
setOwner(newOwner);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @dev Sets a new owner address
|
|
99
|
+
*/
|
|
100
|
+
function setOwner(address newOwner) internal {
|
|
101
|
+
emit OwnershipTransferred(owner(), newOwner);
|
|
102
|
+
addressStorage[OWNER] = newOwner;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
contract Initializable is EternalStorage {
|
|
107
|
+
bytes32 internal constant INITIALIZED =
|
|
108
|
+
0x0a6f646cd611241d8073675e00d1a1ff700fbf1b53fcf473de56d1e6e4b714ba; // keccak256(abi.encodePacked("isInitialized"))
|
|
109
|
+
|
|
110
|
+
function setInitialize() internal {
|
|
111
|
+
boolStorage[INITIALIZED] = true;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function isInitialized() public view returns (bool) {
|
|
115
|
+
return boolStorage[INITIALIZED];
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
contract FuseOldBridgeKill is Initializable, Upgradeable {
|
|
120
|
+
function end() external {
|
|
121
|
+
IGoodDollar(0x495d133B938596C9984d462F007B676bDc57eCEC).renounceMinter();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity >=0.8.0;
|
|
3
|
+
|
|
4
|
+
import "../utils/NameService.sol";
|
|
5
|
+
import "../Interfaces.sol";
|
|
6
|
+
import "../reserve/GoodReserveCDai.sol";
|
|
7
|
+
import "hardhat/console.sol";
|
|
8
|
+
|
|
9
|
+
contract ReserveRestore {
|
|
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(daiFrom, address(this), amount);
|
|
35
|
+
uint256 daiBalance = ERC20(ns.getAddress("DAI")).balanceOf(address(this));
|
|
36
|
+
cERC20 cdai = cERC20(ns.getAddress("CDAI"));
|
|
37
|
+
ERC20 dai = ERC20(ns.getAddress("DAI"));
|
|
38
|
+
|
|
39
|
+
dai.approve(address(cdai), daiBalance);
|
|
40
|
+
//Mint cDAIs
|
|
41
|
+
uint256 cDaiResult = cdai.mint(daiBalance);
|
|
42
|
+
require(cDaiResult == 0, "Minting cDai failed");
|
|
43
|
+
uint256 cdaiBalance = cdai.balanceOf(address(this));
|
|
44
|
+
cdai.transfer(address(reserve), cdaiBalance);
|
|
45
|
+
cdaiBalance = cdai.balanceOf(address(reserve));
|
|
46
|
+
|
|
47
|
+
uint256 gdSupply = ERC20(ns.getAddress("GOODDOLLAR")).totalSupply() -
|
|
48
|
+
LOCKED_HACKED_FUNDS;
|
|
49
|
+
console.log("supply: %s", gdSupply);
|
|
50
|
+
// get 0.0001 dai price in cdai
|
|
51
|
+
uint256 currentPrice = reserve.currentPrice();
|
|
52
|
+
console.log("currentPrice: %s", currentPrice);
|
|
53
|
+
|
|
54
|
+
console.log("cdaiBalance: %s", cdaiBalance);
|
|
55
|
+
|
|
56
|
+
// given price calculate the reserve ratio
|
|
57
|
+
uint32 reserveRatio = uint32(
|
|
58
|
+
(cdaiBalance * 1e2 * 1e6) / (currentPrice * gdSupply)
|
|
59
|
+
); // mul by 1e2 to cover gd precision, cdaibalance precision=initialprice, mul by 1e6 to receive result in the precision of reserveRatio(1e6)
|
|
60
|
+
console.log("reserveRatio: %s", reserveRatio);
|
|
61
|
+
Controller ctrl = Controller(ns.getAddress("CONTROLLER"));
|
|
62
|
+
// function initializeToken(
|
|
63
|
+
// ERC20 _token,
|
|
64
|
+
// uint256 _gdSupply,
|
|
65
|
+
// uint256 _tokenSupply,
|
|
66
|
+
// uint32 _reserveRatio,
|
|
67
|
+
// uint256 _lastExpansion
|
|
68
|
+
// )
|
|
69
|
+
(bool ok, ) = ctrl.genericCall(
|
|
70
|
+
address(reserve.getMarketMaker()),
|
|
71
|
+
abi.encodeCall(
|
|
72
|
+
GoodMarketMaker.initializeToken,
|
|
73
|
+
(cdai, gdSupply, cdaiBalance, reserveRatio, block.timestamp)
|
|
74
|
+
),
|
|
75
|
+
address(avatar),
|
|
76
|
+
0
|
|
77
|
+
);
|
|
78
|
+
require(ok, "initializeToken failed");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function upgrade(address daiFrom, uint256 amount) external {
|
|
82
|
+
require(msg.sender == owner, "not owner");
|
|
83
|
+
require(executed == false, "already upgraded");
|
|
84
|
+
executed = true;
|
|
85
|
+
address avatar = ns.dao().avatar();
|
|
86
|
+
|
|
87
|
+
GoodReserveCDai reserve = GoodReserveCDai(ns.getAddress("RESERVE"));
|
|
88
|
+
ERC20(ns.getAddress("DAI")).transferFrom(daiFrom, address(this), amount);
|
|
89
|
+
uint256 daiBalance = ERC20(ns.getAddress("DAI")).balanceOf(address(this));
|
|
90
|
+
require(daiBalance >= 50000e18, "not enough reserve");
|
|
91
|
+
cERC20 cdai = cERC20(ns.getAddress("CDAI"));
|
|
92
|
+
ERC20 dai = ERC20(ns.getAddress("DAI"));
|
|
93
|
+
|
|
94
|
+
dai.approve(address(cdai), daiBalance);
|
|
95
|
+
//Mint cDAIs
|
|
96
|
+
uint256 cDaiResult = cdai.mint(daiBalance);
|
|
97
|
+
require(cDaiResult == 0, "Minting cDai failed");
|
|
98
|
+
uint256 cdaiBalance = cdai.balanceOf(address(this));
|
|
99
|
+
cdai.transfer(address(reserve), cdaiBalance);
|
|
100
|
+
cdaiBalance = cdai.balanceOf(address(reserve));
|
|
101
|
+
|
|
102
|
+
uint256 gdSupply = ERC20(ns.getAddress("GOODDOLLAR")).totalSupply() -
|
|
103
|
+
LOCKED_HACKED_FUNDS;
|
|
104
|
+
console.log("supply: %s", gdSupply);
|
|
105
|
+
// get 0.0001 dai price in cdai
|
|
106
|
+
uint256 initialPriceCdai = (0.0001 * 1e8 * 1e28) /
|
|
107
|
+
cdai.exchangeRateStored(); //excghange rate is at 1e28 precision rate/1e28=1 cdai price in dai mul by 1e8 to get in cdai precision
|
|
108
|
+
console.log("initialPriceCdai: %s", initialPriceCdai);
|
|
109
|
+
|
|
110
|
+
console.log("cdaiBalance: %s", cdaiBalance);
|
|
111
|
+
|
|
112
|
+
// given price calculate the reserve ratio
|
|
113
|
+
uint32 reserveRatio = uint32(
|
|
114
|
+
(cdaiBalance * 1e2 * 1e6) / (initialPriceCdai * gdSupply)
|
|
115
|
+
); // mul by 1e2 to cover gd precision, cdaibalance precision=initialprice, mul by 1e6 to receive result in the precision of reserveRatio(1e6)
|
|
116
|
+
console.log("reserveRatio: %s", reserveRatio);
|
|
117
|
+
Controller ctrl = Controller(ns.getAddress("CONTROLLER"));
|
|
118
|
+
// function initializeToken(
|
|
119
|
+
// ERC20 _token,
|
|
120
|
+
// uint256 _gdSupply,
|
|
121
|
+
// uint256 _tokenSupply,
|
|
122
|
+
// uint32 _reserveRatio,
|
|
123
|
+
// uint256 _lastExpansion
|
|
124
|
+
// )
|
|
125
|
+
(bool ok, ) = ctrl.genericCall(
|
|
126
|
+
address(reserve.getMarketMaker()),
|
|
127
|
+
abi.encodeCall(
|
|
128
|
+
GoodMarketMaker.initializeToken,
|
|
129
|
+
(cdai, gdSupply, cdaiBalance, reserveRatio, block.timestamp)
|
|
130
|
+
),
|
|
131
|
+
address(avatar),
|
|
132
|
+
0
|
|
133
|
+
);
|
|
134
|
+
require(ok, "initializeToken failed");
|
|
135
|
+
// ContributionCalc(
|
|
136
|
+
// ns.getAddress("CONTRIBUTION_CALCULATION")
|
|
137
|
+
// ).setContributionRatio(0.1*1e18,1e18);
|
|
138
|
+
|
|
139
|
+
// exit contribution to 10%
|
|
140
|
+
(ok, ) = ctrl.genericCall(
|
|
141
|
+
address(ns.getAddress("CONTRIBUTION_CALCULATION")),
|
|
142
|
+
abi.encodeCall(ContributionCalc.setContributionRatio, (0.1 * 1e18, 1e18)),
|
|
143
|
+
address(avatar),
|
|
144
|
+
0
|
|
145
|
+
);
|
|
146
|
+
require(ok, "setContributionRatio failed");
|
|
147
|
+
|
|
148
|
+
(ok, ) = ctrl.genericCall(
|
|
149
|
+
address(reserve),
|
|
150
|
+
abi.encodeCall(GoodReserveCDai.setGDXDisabled, (true, true)),
|
|
151
|
+
address(avatar),
|
|
152
|
+
0
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
require(ok, "setContributionRatio failed");
|
|
156
|
+
}
|
|
157
|
+
}
|