@gooddollar/goodprotocol 2.0.32 → 2.0.34-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/BuyFromReserveHelper.min.json +1 -0
- package/artifacts/abis/Faucet.min.json +1 -1
- package/artifacts/abis/GoodDollar2.min.json +1 -0
- package/artifacts/abis/ISuperToken.min.json +1 -1
- package/artifacts/abis/IdentityV3.min.json +1 -0
- package/artifacts/abis/SuperGoodDollar.min.json +1 -1
- package/artifacts/abis/SuperToken.min.json +1 -1
- package/artifacts/abis/SuperfluidFaucet.min.json +1 -1
- package/artifacts/abis/UBISchemeV2.min.json +1 -1
- 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/IQuoter.sol/IQuoterV2.dbg.json +4 -0
- package/artifacts/contracts/IQuoter.sol/IQuoterV2.json +211 -0
- package/artifacts/contracts/Interfaces.sol/AggregatorV3Interface.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ERC20.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IAaveIncentivesController.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IAdminWallet.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IDonationStaking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IERC2917.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IGoodStaking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IHasRouter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IIdentity.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ILendingPool.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IMultichainRouter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/INameService.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IQuoterV2.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ISwapRouter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IUBIScheme.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ProxyAdmin.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Reserve.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Uniswap.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/UniswapFactory.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/UniswapPair.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/cERC20.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IBancorExchangeProvider.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IBroker.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IGoodDollarExchangeProvider.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IGoodDollarExpansionController.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IMentoReserve.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/ITradingLimits.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.json +57 -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 +1 -1
- package/artifacts/contracts/fuseFaucet/SuperfluidFacuet.sol/SuperfluidFaucet.json +46 -28
- 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 +2 -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/identity/IdentityV3.sol/IdentityV3.dbg.json +4 -0
- package/artifacts/contracts/identity/IdentityV3.sol/IdentityV3.json +1089 -0
- 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/AaveMock.sol/AaveMock.json +2 -2
- package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.json +2 -2
- package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.json +2 -2
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTest.json +2 -2
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTestHelper.json +2 -2
- package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.json +2 -2
- package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.json +2 -2
- package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.json +2 -2
- package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.json +2 -2
- 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 +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/EthUSDMockOracle.sol/EthUSDMockOracle.json +2 -2
- package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.json +2 -2
- package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.json +2 -2
- 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 +2 -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/IncentiveControllerMock.sol/IncentiveControllerMock.json +2 -2
- package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.json +2 -2
- 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/PayableMock.sol/PayableMock.json +2 -2
- package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.json +2 -2
- package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.json +2 -2
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.json +2 -2
- package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.json +2 -2
- 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/UsdcMock.sol/USDCMock.json +2 -2
- package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.json +2 -2
- package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.json +2 -2
- package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.json +2 -2
- package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.json +2 -2
- package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.json +2 -2
- package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.json +2 -2
- package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.json +2 -2
- package/artifacts/contracts/reserve/CeloDistributionHelper.sol/CeloDistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/CeloDistributionHelper.sol/CeloDistributionHelper.json +2 -2
- 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/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 +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/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/Math64X64.sol/Math64x64.json +2 -2
- 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/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.json +2 -2
- 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/GoodDollar2.sol/GoodDollar2.dbg.json +4 -0
- package/artifacts/contracts/token/GoodDollar2.sol/GoodDollar2.json +1206 -0
- 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/MultichainFeeFormula.sol/MultichainFeeFormula.json +2 -2
- 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/ISuperToken.sol/ISuperToken.json +0 -52
- package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +2 -74
- package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.json +2 -54
- 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/UUPSProxy.json +2 -2
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.json +2 -2
- 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 -7
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.json +2 -2
- 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/BancorFormula.sol/BancorFormula.json +2 -2
- 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/BuyFromReserveHelper.sol/BuyFromReserveHelper.dbg.json +4 -0
- package/artifacts/contracts/utils/BuyFromReserveHelper.sol/BuyFromReserveHelper.json +476 -0
- 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/DSMath.sol/DSMath.json +2 -2
- package/artifacts/contracts/utils/DataTypes.sol/DataTypes.dbg.json +1 -1
- package/artifacts/contracts/utils/DataTypes.sol/DataTypes.json +2 -2
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/EternalStorage.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/EternalStorage.json +2 -2
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/FuseOldBridgeKill.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/FuseOldBridgeKill.json +2 -2
- 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/Initializable.json +2 -2
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Ownable.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Ownable.json +2 -2
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Upgradeable.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Upgradeable.json +2 -2
- 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/MultiCall.sol/Multicall.json +2 -2
- 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/NameService.sol/NameService.json +2 -2
- 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/ProtoclUpgradeV4Mento.sol/MentoExchange.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtoclUpgradeV4Mento.sol/ProtocolUpgradeV4Mento.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtoclUpgradeV4Mento.sol/ProtocolUpgradeV4Mento.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/ERC1967Proxy.json +2 -2
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.dbg.json +1 -1
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.json +2 -2
- 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 +1 -1
- package/artifacts/contracts/utils/ReserveRestore.sol/ReserveRestore.json +2 -2
- package/contracts/IQuoter.sol +108 -0
- package/contracts/fuseFaucet/Faucet.sol +49 -37
- package/contracts/fuseFaucet/SuperfluidFacuet.sol +29 -8
- package/contracts/identity/IdentityV3.sol +534 -0
- package/contracts/token/ERC20PresetMinterPauserUpgradeable.sol +8 -9
- package/contracts/token/GoodDollar.sol +1 -1
- package/contracts/token/GoodDollar2.sol +13 -0
- package/contracts/token/superfluid/ISuperToken.sol +0 -19
- package/contracts/token/superfluid/SuperGoodDollar.sol +2 -21
- package/contracts/token/superfluid/SuperToken.sol +2 -2
- package/contracts/token/superfluid/SuperfluidToken.sol +66 -67
- package/contracts/ubi/UBISchemeV2.sol +12 -18
- package/contracts/utils/BuyFromReserveHelper.sol +129 -0
- package/dist/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.json +2 -2
- package/dist/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +177 -256
- package/dist/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.json +2 -2
- package/dist/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.json +2 -2
- package/dist/test-sdk/deploySuperGoodDollar.d.ts +1 -1
- package/dist/test-sdk/deploySuperGoodDollar.js +4 -8
- package/dist/test-sdk/index.js +1 -5
- package/hardhat.config.ts +37 -30
- package/package.json +3 -2
- package/releases/deploy-settings.json +5 -1
- package/releases/deployment.json +27 -1
- package/releases/olddao.json +1 -1
- package/scripts/analytics/activeGDStakers.ts +188 -0
- package/scripts/fv.ts +19 -1
- package/scripts/multichain-deploy/0_proxyFactory-deploy.ts +28 -5
- package/scripts/multichain-deploy/1_basicdao-deploy.ts +111 -73
- package/scripts/multichain-deploy/2_helpers-deploy.ts +13 -8
- package/scripts/multichain-deploy/4_ubi-deploy.ts +17 -19
- package/scripts/multichain-deploy/5_gov-deploy.ts +58 -26
- package/scripts/multichain-deploy/flattened/Avatar.sol +913 -0
- package/scripts/multichain-deploy/flattened/Controller.sol +1891 -0
- package/scripts/multichain-deploy/flattened/FeeFormula.sol +1290 -0
- package/scripts/multichain-deploy/fulldeploy.sh +17 -17
- package/scripts/multichain-deploy/helpers.ts +203 -70
- package/scripts/multichain-deploy/verify.ts +41 -0
- package/test/governance/ClaimersDistribution.test.ts +1 -1
- package/test/helpers.ts +59 -46
- package/test/identity/IdentityV2.test.ts +4 -1
- package/test/identity/IdentityV3.test.ts +449 -0
- package/test/invite/InvitesV2.test.ts +1 -1
- package/test/token/GoodDollar.test.ts +1 -1
- package/test/token/SuperGoodDollar.nohost.test.ts +383 -0
- package/test/token/SuperGoodDollar.test.ts +2 -10
- package/test/ubi/UBIScheme.e2e.test.ts +5 -5
- package/test/ubi/UBISchemeCycle.test.ts +69 -22
- package/test/ubi/UBISchemeV2.test.ts +636 -0
- package/test/utils/AdminWallet.test.ts +1 -1
- package/test/utils/ProxyFactory.test.ts +4 -1
- package/types/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.ts +108 -0
- package/types/@openzeppelin/contracts/proxy/ERC1967/index.ts +1 -0
- package/types/contracts/IQuoter.sol/IQuoterV2.ts +297 -0
- package/types/contracts/IQuoter.sol/index.ts +4 -0
- package/types/contracts/Interfaces.sol/AToken.ts +81 -0
- package/types/contracts/Interfaces.sol/IAaveIncentivesControllerV3.ts +156 -0
- package/types/contracts/Interfaces.sol/ILendingPoolV3.ts +254 -0
- package/types/contracts/fuseFaucet/Faucet.ts +109 -11
- package/types/contracts/fuseFaucet/SuperfluidBaseFacuet.sol/EthDistributor.ts +648 -0
- package/types/contracts/fuseFaucet/SuperfluidBaseFacuet.sol/EthDistributorUpgradeable.ts +843 -0
- package/types/contracts/fuseFaucet/SuperfluidBaseFacuet.sol/index.ts +4 -0
- package/types/contracts/fuseFaucet/SuperfluidFacuet.sol/SuperfluidFaucet.ts +79 -41
- package/types/contracts/identity/IdentityV3.ts +1899 -0
- package/types/contracts/identity/index.ts +1 -0
- package/types/contracts/index.ts +2 -0
- package/types/contracts/mocks/CeloDistributionHelperTest.sol/DistributionHelperTestHelper.ts +1252 -0
- package/types/contracts/reserve/GoodReserveADai.ts +2212 -0
- package/types/contracts/staking/aave/GoodAave3StakingV2.sol/GoodAaveStakingV2.ts +1808 -0
- package/types/contracts/staking/aave/GoodAave3StakingV2.sol/index.ts +4 -0
- package/types/contracts/token/GoodDollar18.ts +1871 -0
- package/types/contracts/token/GoodDollar2.ts +1871 -0
- package/types/contracts/token/index.ts +1 -0
- package/types/contracts/token/superfluid/ISuperToken.ts +0 -84
- package/types/contracts/token/superfluid/SuperGoodDollar.ts +12 -126
- package/types/contracts/token/superfluid/SuperToken.ts +0 -84
- package/types/contracts/ubi/UBISchemeV2.ts +3 -14
- package/types/contracts/utils/BuyFromReserveHelper.ts +699 -0
- package/types/contracts/utils/BuyGDClone.sol/IQuoterV2.ts +184 -0
- package/types/contracts/utils/BuyGDClone.sol/ISwapRouter.ts +306 -0
- package/types/contracts/utils/FuseOldBridgeKill.sol/BasicAMBErc677ToErc677.ts +108 -0
- package/types/contracts/utils/ProtocolUpgradeV4Mento.sol/MentoExchange.ts +81 -0
- package/types/contracts/utils/ProtocolUpgradeV4Mento.sol/ProtocolUpgradeV4Mento.ts +161 -0
- package/types/contracts/utils/ProtocolUpgradeV4Mento.sol/index.ts +5 -0
- package/types/contracts/utils/ReserveRestore.sol/MentoExchange.ts +81 -0
- package/types/contracts/utils/ReserveRestore.sol/ReserveRestore.ts +112 -0
- package/types/contracts/utils/ReserveRestore.sol/index.ts +5 -0
- package/types/contracts/utils/index.ts +1 -0
- package/types/factories/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy__factory.ts +146 -0
- package/types/factories/@openzeppelin/contracts/proxy/ERC1967/index.ts +1 -0
- package/types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts +1 -1
- package/types/factories/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable__factory.ts +1 -1
- package/types/factories/@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable__factory.ts +1 -1
- package/types/factories/@superfluid-finance/ethereum-contracts/contracts/libs/EventsEmitter__factory.ts +1 -1
- package/types/factories/@superfluid-finance/ethereum-contracts/contracts/superfluid/ConstantInflowNFT__factory.ts +1 -1
- package/types/factories/@superfluid-finance/ethereum-contracts/contracts/superfluid/ConstantOutflowNFT__factory.ts +1 -1
- package/types/factories/contracts/IQuoter.sol/IQuoterV2__factory.ts +226 -0
- package/types/factories/contracts/IQuoter.sol/index.ts +4 -0
- package/types/factories/contracts/Interfaces.sol/AToken__factory.ts +36 -0
- package/types/factories/contracts/Interfaces.sol/IAaveIncentivesControllerV3__factory.ts +88 -0
- package/types/factories/contracts/Interfaces.sol/ILendingPoolV3__factory.ts +186 -0
- package/types/factories/contracts/fuseFaucet/Faucet__factory.ts +56 -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/SuperfluidBaseFacuet.sol/EthDistributorUpgradeable__factory.ts +572 -0
- package/types/factories/contracts/fuseFaucet/SuperfluidBaseFacuet.sol/EthDistributor__factory.ts +482 -0
- package/types/factories/contracts/fuseFaucet/SuperfluidBaseFacuet.sol/index.ts +4 -0
- package/types/factories/contracts/fuseFaucet/SuperfluidFacuet.sol/SuperfluidFaucet__factory.ts +45 -27
- package/types/factories/contracts/governance/ClaimersDistribution__factory.ts +1 -1
- package/types/factories/contracts/governance/CompoundVotingMachine__factory.ts +1 -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/identity/IdentityV3__factory.ts +1140 -0
- package/types/factories/contracts/identity/index.ts +1 -0
- package/types/factories/contracts/index.ts +1 -0
- 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/AaveMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/AaveUSDMockOracle__factory.ts +1 -1
- package/types/factories/contracts/mocks/BatUSDMockOracle__factory.ts +1 -1
- package/types/factories/contracts/mocks/CBATMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/CDAILowWorthMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/CDAIMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/CDAINonMintableMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/CDecimalsMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/CSDTMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/CUSDCMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTestHelper__factory.ts +1 -1
- package/types/factories/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTest__factory.ts +1 -1
- package/types/factories/contracts/mocks/CeloDistributionHelperTest.sol/DistributionHelperTestHelper__factory.ts +929 -0
- package/types/factories/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle__factory.ts +1 -1
- package/types/factories/contracts/mocks/DAIMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/DaiEthPriceMockOracle__factory.ts +1 -1
- package/types/factories/contracts/mocks/DecimalsMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/DistributionBridgeMock__factory.ts +1 -1
- 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/EthUSDMockOracle__factory.ts +1 -1
- package/types/factories/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/GasPriceMockOracle__factory.ts +1 -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 +1 -1
- package/types/factories/contracts/mocks/IdentityMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/IncentiveControllerMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/LendingPoolMock__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/PayableMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/SixteenDecimalsTokenMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/StakingMockFixedAPY__factory.ts +1 -1
- package/types/factories/contracts/mocks/SwapHelperTest__factory.ts +1 -1
- package/types/factories/contracts/mocks/TwentyDecimalsTokenMock__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/mocks/UsdcMock.sol/USDCMock__factory.ts +1 -1
- package/types/factories/contracts/reserve/CeloDistributionHelper__factory.ts +1 -1
- 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/GoodReserveADai__factory.ts +1502 -0
- package/types/factories/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai__factory.ts +1 -1
- 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 +1 -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/GoodAave3StakingV2.sol/GoodAaveStakingV2__factory.ts +1240 -0
- package/types/factories/contracts/staking/aave/GoodAave3StakingV2.sol/index.ts +4 -0
- 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/ERC20PresetMinterPauserUpgradeable__factory.ts +1 -1
- package/types/factories/contracts/token/GoodDollar18__factory.ts +1257 -0
- package/types/factories/contracts/token/GoodDollar2__factory.ts +1257 -0
- package/types/factories/contracts/token/GoodDollar__factory.ts +1 -1
- package/types/factories/contracts/token/MultichainFeeFormula__factory.ts +1 -1
- package/types/factories/contracts/token/index.ts +1 -0
- package/types/factories/contracts/token/superfluid/ISuperToken__factory.ts +0 -52
- package/types/factories/contracts/token/superfluid/SuperGoodDollar__factory.ts +1 -73
- package/types/factories/contracts/token/superfluid/SuperToken__factory.ts +1 -53
- package/types/factories/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy__factory.ts +1 -1
- package/types/factories/contracts/ubi/UBISchemeV2__factory.ts +1 -6
- 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 -1
- package/types/factories/contracts/utils/BancorFormula__factory.ts +1 -1
- 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/BuyFromReserveHelper__factory.ts +566 -0
- 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/IQuoterV2__factory.ts +126 -0
- package/types/factories/contracts/utils/BuyGDClone.sol/ISwapRouter__factory.ts +220 -0
- 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/BasicAMBErc677ToErc677__factory.ts +86 -0
- package/types/factories/contracts/utils/FuseOldBridgeKill.sol/FuseOldBridgeKill__factory.ts +1 -1
- package/types/factories/contracts/utils/FuseOldBridgeKill.sol/Initializable__factory.ts +1 -1
- package/types/factories/contracts/utils/FuseOldBridgeKill.sol/Ownable__factory.ts +1 -1
- 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/MultiCall.sol/Multicall__factory.ts +1 -1
- package/types/factories/contracts/utils/MultichainBridgeHelper__factory.ts +1 -1
- package/types/factories/contracts/utils/NameService__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/ProtoclUpgradeV4Mento.sol/ProtocolUpgradeV4Mento__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/ProtocolUpgradeV4Mento.sol/MentoExchange__factory.ts +39 -0
- package/types/factories/contracts/utils/ProtocolUpgradeV4Mento.sol/ProtocolUpgradeV4Mento__factory.ts +152 -0
- package/types/factories/contracts/utils/ProtocolUpgradeV4Mento.sol/index.ts +5 -0
- package/types/factories/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy__factory.ts +1 -1
- package/types/factories/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967__factory.ts +1 -1
- package/types/factories/contracts/utils/ReputationTestHelper__factory.ts +1 -1
- package/types/factories/contracts/utils/ReserveRestore.sol/MentoExchange__factory.ts +39 -0
- package/types/factories/contracts/utils/ReserveRestore.sol/ReserveRestore__factory.ts +95 -0
- package/types/factories/contracts/utils/ReserveRestore.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 +45 -0
- package/types/index.ts +8 -2
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { ethers } from "hardhat";
|
|
2
|
+
import { assert, expect } from "chai";
|
|
3
|
+
import { loadFixture } from "@nomicfoundation/hardhat-network-helpers";
|
|
4
|
+
import TransferAndCallMockABI from "@gooddollar/goodcontracts/build/contracts/TransferAndCallMock.json";
|
|
5
|
+
import { createDAO, deploySuperGoodDollar } from "../helpers";
|
|
6
|
+
import { ISuperGoodDollar } from "../../types";
|
|
7
|
+
|
|
8
|
+
let sfHost,
|
|
9
|
+
founder,
|
|
10
|
+
alice,
|
|
11
|
+
bob,
|
|
12
|
+
eve,
|
|
13
|
+
newHost,
|
|
14
|
+
identityMock,
|
|
15
|
+
receiverMock,
|
|
16
|
+
sgd: ISuperGoodDollar, // stands for "SuperGoodDollar"
|
|
17
|
+
feesFormula10PctMock;
|
|
18
|
+
|
|
19
|
+
const alotOfDollars = ethers.utils.parseEther("100000");
|
|
20
|
+
const tenDollars = ethers.utils.parseEther("10");
|
|
21
|
+
const oneDollar = ethers.utils.parseEther("1");
|
|
22
|
+
const tenDollarsPerDay = "124378109452730"; // flowrate per second
|
|
23
|
+
|
|
24
|
+
const initialState = async () => {};
|
|
25
|
+
|
|
26
|
+
before(async function () {
|
|
27
|
+
//get accounts from hardhat
|
|
28
|
+
[founder, alice, bob, eve, newHost] = await ethers.getSigners();
|
|
29
|
+
|
|
30
|
+
await createDAO();
|
|
31
|
+
|
|
32
|
+
const sfContracts = {
|
|
33
|
+
host: ethers.constants.AddressZero
|
|
34
|
+
};
|
|
35
|
+
sfHost = sfContracts.host;
|
|
36
|
+
|
|
37
|
+
// GoodDollar specific init
|
|
38
|
+
const FeesFormulaMockFactory = await ethers.getContractFactory(
|
|
39
|
+
"FeesFormulaMock",
|
|
40
|
+
founder
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
const feesFormula0PctMock = await FeesFormulaMockFactory.deploy(0);
|
|
44
|
+
|
|
45
|
+
feesFormula10PctMock = await FeesFormulaMockFactory.deploy(100000);
|
|
46
|
+
|
|
47
|
+
// the zero address is a placeholder for the dao contract
|
|
48
|
+
const IdentityMockFactory = await ethers.getContractFactory(
|
|
49
|
+
"IdentityMock",
|
|
50
|
+
founder
|
|
51
|
+
);
|
|
52
|
+
identityMock = await IdentityMockFactory.deploy(
|
|
53
|
+
"0x0000000000000000000000000000000000000000"
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
receiverMock = await new ethers.ContractFactory(
|
|
57
|
+
TransferAndCallMockABI.abi,
|
|
58
|
+
TransferAndCallMockABI.bytecode,
|
|
59
|
+
founder
|
|
60
|
+
).deploy();
|
|
61
|
+
|
|
62
|
+
console.log("deploying test supergooddollar...");
|
|
63
|
+
sgd = (await deploySuperGoodDollar(sfContracts, [
|
|
64
|
+
"SuperGoodDollar",
|
|
65
|
+
"SGD",
|
|
66
|
+
0, // cap
|
|
67
|
+
feesFormula0PctMock.address,
|
|
68
|
+
identityMock.address,
|
|
69
|
+
receiverMock.address,
|
|
70
|
+
founder.address
|
|
71
|
+
])) as ISuperGoodDollar;
|
|
72
|
+
|
|
73
|
+
await sgd.mint(founder.address, alotOfDollars);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
describe("SuperGoodDollar No Host", async function () {
|
|
77
|
+
it("check superfluid host", async () => {
|
|
78
|
+
expect(await sgd.getHost()).equal(sfHost);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it("check ERC20 metadata", async function () {
|
|
82
|
+
await loadFixture(initialState);
|
|
83
|
+
const symbol = await sgd.symbol();
|
|
84
|
+
const name = await sgd.name();
|
|
85
|
+
assert.equal(symbol, "SGD", "symbol mismatch");
|
|
86
|
+
assert.equal(name, "SuperGoodDollar", "name mismatch");
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("mint to alice", async function () {
|
|
90
|
+
await loadFixture(initialState);
|
|
91
|
+
await sgd.mint(alice.address, alotOfDollars);
|
|
92
|
+
const balAfter = await sgd.balanceOf(alice.address);
|
|
93
|
+
|
|
94
|
+
assert.equal(
|
|
95
|
+
balAfter.toString(),
|
|
96
|
+
alotOfDollars.toString(),
|
|
97
|
+
"wrong balance after mint"
|
|
98
|
+
);
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it("do ERC20 transfer", async function () {
|
|
102
|
+
await loadFixture(initialState);
|
|
103
|
+
await sgd.mint(alice.address, tenDollars);
|
|
104
|
+
await sgd.connect(alice).transfer(bob.address, tenDollars);
|
|
105
|
+
const balAfter = await sgd.balanceOf(bob.address);
|
|
106
|
+
|
|
107
|
+
assert.equal(
|
|
108
|
+
balAfter.toString(),
|
|
109
|
+
tenDollars.toString(),
|
|
110
|
+
"wrong balance after transfer"
|
|
111
|
+
);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it("do ERC20 transferFrom", async function () {
|
|
115
|
+
await loadFixture(initialState);
|
|
116
|
+
await sgd.approve(alice.address, tenDollars);
|
|
117
|
+
await sgd
|
|
118
|
+
.connect(alice)
|
|
119
|
+
.transferFrom(founder.address, bob.address, tenDollars);
|
|
120
|
+
assert.equal(
|
|
121
|
+
(await sgd.balanceOf(bob.address)).toString(),
|
|
122
|
+
tenDollars.toString(),
|
|
123
|
+
"wrong balance after transferFrom"
|
|
124
|
+
);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it("pauseable", async function () {
|
|
128
|
+
await loadFixture(initialState);
|
|
129
|
+
await sgd.connect(founder).pause();
|
|
130
|
+
|
|
131
|
+
await expect(sgd.transfer(bob.address, tenDollars)).revertedWithCustomError(
|
|
132
|
+
sgd,
|
|
133
|
+
"SUPER_GOODDOLLAR_PAUSED"
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
await sgd.connect(founder).unpause();
|
|
137
|
+
|
|
138
|
+
await sgd.transfer(bob.address, tenDollars);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it("non-zero fees are applied", async function () {
|
|
142
|
+
await loadFixture(initialState);
|
|
143
|
+
|
|
144
|
+
await sgd.connect(founder).mint(alice.address, tenDollars);
|
|
145
|
+
await sgd.setFormula(feesFormula10PctMock.address);
|
|
146
|
+
|
|
147
|
+
await expect(
|
|
148
|
+
sgd.connect(alice).transfer(bob.address, tenDollars)
|
|
149
|
+
).revertedWith(/Not enough balance to pay TX fee/);
|
|
150
|
+
|
|
151
|
+
// mint the extra amount needed for 10% fees
|
|
152
|
+
await sgd.mint(alice.address, oneDollar);
|
|
153
|
+
await sgd.connect(alice).transfer(bob.address, tenDollars);
|
|
154
|
+
|
|
155
|
+
// since the sender pays the fee, alice should have spent 11$ and bob received 10$
|
|
156
|
+
assert.equal(
|
|
157
|
+
(await sgd.balanceOf(alice.address)).toString(),
|
|
158
|
+
"0",
|
|
159
|
+
"alice: wrong balance after transfer"
|
|
160
|
+
);
|
|
161
|
+
assert.equal(
|
|
162
|
+
(await sgd.balanceOf(bob.address)).toString(),
|
|
163
|
+
tenDollars.toString(),
|
|
164
|
+
"bob: wrong balance after transfer"
|
|
165
|
+
);
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
it("non-zero fees are applied for transferFrom (verify override of _transferForm)", async function () {
|
|
169
|
+
await loadFixture(initialState);
|
|
170
|
+
|
|
171
|
+
await sgd.connect(founder).mint(alice.address, tenDollars);
|
|
172
|
+
await sgd.setFormula(feesFormula10PctMock.address);
|
|
173
|
+
|
|
174
|
+
await sgd.connect(alice).approve(founder.address, tenDollars.mul(2));
|
|
175
|
+
|
|
176
|
+
await expect(
|
|
177
|
+
sgd.connect(founder).transferFrom(alice.address, bob.address, tenDollars)
|
|
178
|
+
).revertedWith(/Not enough balance to pay TX fee/);
|
|
179
|
+
|
|
180
|
+
// mint the extra amount needed for 10% fees
|
|
181
|
+
await sgd.connect(founder).mint(alice.address, oneDollar);
|
|
182
|
+
assert.equal(
|
|
183
|
+
(await sgd.balanceOf(alice.address)).toString(),
|
|
184
|
+
tenDollars.add(oneDollar).toString(),
|
|
185
|
+
"alice: wrong balance after mint"
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
await sgd
|
|
189
|
+
.connect(founder)
|
|
190
|
+
.transferFrom(alice.address, bob.address, tenDollars);
|
|
191
|
+
|
|
192
|
+
// since the sender pays the fee, alice should have spent 11$ and bob received 10$
|
|
193
|
+
assert.equal(
|
|
194
|
+
(await sgd.balanceOf(alice.address)).toString(),
|
|
195
|
+
"0",
|
|
196
|
+
"alice: wrong balance after transfer"
|
|
197
|
+
);
|
|
198
|
+
assert.equal(
|
|
199
|
+
(await sgd.balanceOf(bob.address)).toString(),
|
|
200
|
+
tenDollars.toString(),
|
|
201
|
+
"bob: wrong balance after transfer"
|
|
202
|
+
);
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
it("should not be able to initialize again", async () => {
|
|
206
|
+
await loadFixture(initialState);
|
|
207
|
+
await expect(
|
|
208
|
+
sgd["initialize(string,string,uint256,address,address,address,address)"](
|
|
209
|
+
"x",
|
|
210
|
+
"y",
|
|
211
|
+
1,
|
|
212
|
+
ethers.constants.AddressZero,
|
|
213
|
+
ethers.constants.AddressZero,
|
|
214
|
+
ethers.constants.AddressZero,
|
|
215
|
+
ethers.constants.AddressZero
|
|
216
|
+
)
|
|
217
|
+
).revertedWith(/Initializable: contract is already initialized/);
|
|
218
|
+
|
|
219
|
+
await expect(
|
|
220
|
+
sgd["initialize(address,uint8,string,string)"](
|
|
221
|
+
ethers.constants.AddressZero,
|
|
222
|
+
2,
|
|
223
|
+
"GD",
|
|
224
|
+
"GD"
|
|
225
|
+
)
|
|
226
|
+
).revertedWith(/Initializable: contract is not initializing/);
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
it("update the GoodDollar logic", async function () {
|
|
230
|
+
await loadFixture(initialState);
|
|
231
|
+
const sgdProxiable = await ethers.getContractAt(
|
|
232
|
+
"contracts/token/superfluid/UUPSProxiable.sol:UUPSProxiable",
|
|
233
|
+
sgd.address,
|
|
234
|
+
founder.signer
|
|
235
|
+
);
|
|
236
|
+
|
|
237
|
+
const auxCodeAddrBefore = await sgdProxiable.getCodeAddress();
|
|
238
|
+
|
|
239
|
+
const newLogic = await (
|
|
240
|
+
await ethers.getContractFactory("SuperGoodDollar", founder)
|
|
241
|
+
).deploy(newHost.address);
|
|
242
|
+
|
|
243
|
+
await expect(
|
|
244
|
+
sgdProxiable.connect(eve).updateCode(newLogic.address)
|
|
245
|
+
).revertedWith(/not owner/);
|
|
246
|
+
|
|
247
|
+
await sgdProxiable.connect(founder).updateCode(newLogic.address);
|
|
248
|
+
|
|
249
|
+
const auxCodeAddrAfter = await sgdProxiable.getCodeAddress();
|
|
250
|
+
|
|
251
|
+
assert.notEqual(
|
|
252
|
+
auxCodeAddrBefore,
|
|
253
|
+
auxCodeAddrAfter,
|
|
254
|
+
"code address unchanged"
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
expect(await sgd.getHost()).equal(newHost.address);
|
|
258
|
+
await expect(
|
|
259
|
+
sgd["initialize(string,string,uint256,address,address,address,address)"](
|
|
260
|
+
"x",
|
|
261
|
+
"y",
|
|
262
|
+
1,
|
|
263
|
+
ethers.constants.AddressZero,
|
|
264
|
+
ethers.constants.AddressZero,
|
|
265
|
+
ethers.constants.AddressZero,
|
|
266
|
+
ethers.constants.AddressZero
|
|
267
|
+
)
|
|
268
|
+
).revertedWith(/Initializable: contract is already initialized/);
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
describe("ERC20Permit", () => {
|
|
272
|
+
const name = "SuperGoodDollar";
|
|
273
|
+
const version = "1";
|
|
274
|
+
|
|
275
|
+
const Permit = [
|
|
276
|
+
{ name: "owner", type: "address" },
|
|
277
|
+
{ name: "spender", type: "address" },
|
|
278
|
+
{ name: "value", type: "uint256" },
|
|
279
|
+
{ name: "nonce", type: "uint256" },
|
|
280
|
+
{ name: "deadline", type: "uint256" }
|
|
281
|
+
];
|
|
282
|
+
|
|
283
|
+
it("initial nonce is 0", async function () {
|
|
284
|
+
expect(await sgd.nonces(alice.address)).to.equal(0);
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
it("domain separator", async function () {
|
|
288
|
+
const hashedDomain = await ethers.utils._TypedDataEncoder.hashDomain({
|
|
289
|
+
name,
|
|
290
|
+
version,
|
|
291
|
+
chainId: 4447,
|
|
292
|
+
verifyingContract: sgd.address
|
|
293
|
+
});
|
|
294
|
+
expect(await sgd.DOMAIN_SEPARATOR()).to.equal(hashedDomain);
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
describe("permit", function () {
|
|
298
|
+
const wallet = ethers.Wallet.createRandom();
|
|
299
|
+
|
|
300
|
+
const chainId = 4447;
|
|
301
|
+
const owner = wallet.address;
|
|
302
|
+
const value = 42;
|
|
303
|
+
const nonce = 0;
|
|
304
|
+
const maxDeadline = ethers.constants.MaxUint256;
|
|
305
|
+
|
|
306
|
+
const buildData = (
|
|
307
|
+
chainId,
|
|
308
|
+
verifyingContract,
|
|
309
|
+
deadline = maxDeadline
|
|
310
|
+
) => ({
|
|
311
|
+
primaryType: "Permit",
|
|
312
|
+
types: { Permit },
|
|
313
|
+
domain: { name, version, chainId, verifyingContract },
|
|
314
|
+
message: { owner, spender: bob.address, value, nonce, deadline }
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
it("accepts owner signature", async function () {
|
|
318
|
+
const data = buildData(chainId, sgd.address);
|
|
319
|
+
const signature = await wallet._signTypedData(
|
|
320
|
+
data.domain,
|
|
321
|
+
data.types,
|
|
322
|
+
data.message
|
|
323
|
+
);
|
|
324
|
+
const { v, r, s } = ethers.utils.splitSignature(signature);
|
|
325
|
+
|
|
326
|
+
await sgd.permit(owner, bob.address, value, maxDeadline, v, r, s);
|
|
327
|
+
|
|
328
|
+
expect(await sgd.nonces(owner)).to.equal(1);
|
|
329
|
+
expect(await sgd.allowance(owner, bob.address)).to.equal(value);
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
it("rejects reused signature", async function () {
|
|
333
|
+
await loadFixture(initialState);
|
|
334
|
+
|
|
335
|
+
const data = buildData(chainId, sgd.address);
|
|
336
|
+
const signature = await wallet._signTypedData(
|
|
337
|
+
data.domain,
|
|
338
|
+
data.types,
|
|
339
|
+
data.message
|
|
340
|
+
);
|
|
341
|
+
const { v, r, s } = ethers.utils.splitSignature(signature);
|
|
342
|
+
|
|
343
|
+
await sgd.permit(owner, bob.address, value, maxDeadline, v, r, s);
|
|
344
|
+
|
|
345
|
+
await expect(
|
|
346
|
+
sgd.permit(owner, bob.address, value, maxDeadline, v, r, s)
|
|
347
|
+
).revertedWith(/ERC20Permit: invalid signature/);
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
it("rejects other signature", async function () {
|
|
351
|
+
const otherWallet = ethers.Wallet.createRandom();
|
|
352
|
+
const data = buildData(chainId, sgd.address);
|
|
353
|
+
const signature = await otherWallet._signTypedData(
|
|
354
|
+
data.domain,
|
|
355
|
+
data.types,
|
|
356
|
+
data.message
|
|
357
|
+
);
|
|
358
|
+
const { v, r, s } = ethers.utils.splitSignature(signature);
|
|
359
|
+
|
|
360
|
+
await expect(
|
|
361
|
+
sgd.permit(owner, bob.address, value, maxDeadline, v, r, s)
|
|
362
|
+
).revertedWith(/ERC20Permit: invalid signature/);
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
it("rejects expired permit", async function () {
|
|
366
|
+
const block = await ethers.provider.getBlock("latest");
|
|
367
|
+
const deadline = ethers.BigNumber.from(block.timestamp.toFixed(0));
|
|
368
|
+
|
|
369
|
+
const data = buildData(chainId, sgd.address, deadline);
|
|
370
|
+
const signature = await wallet._signTypedData(
|
|
371
|
+
data.domain,
|
|
372
|
+
data.types,
|
|
373
|
+
data.message
|
|
374
|
+
);
|
|
375
|
+
const { v, r, s } = ethers.utils.splitSignature(signature);
|
|
376
|
+
|
|
377
|
+
await expect(
|
|
378
|
+
sgd.permit(owner, bob.address, value, deadline, v, r, s)
|
|
379
|
+
).revertedWith(/ERC20Permit: expired deadline/);
|
|
380
|
+
});
|
|
381
|
+
});
|
|
382
|
+
});
|
|
383
|
+
});
|
|
@@ -249,17 +249,13 @@ describe("SuperGoodDollar", async function () {
|
|
|
249
249
|
it("should not be able to initialize again", async () => {
|
|
250
250
|
await loadFixture(initialState);
|
|
251
251
|
await expect(
|
|
252
|
-
sgd[
|
|
253
|
-
"initialize(string,string,uint256,address,address,address,address,address,address)"
|
|
254
|
-
](
|
|
252
|
+
sgd["initialize(string,string,uint256,address,address,address,address)"](
|
|
255
253
|
"x",
|
|
256
254
|
"y",
|
|
257
255
|
1,
|
|
258
256
|
ethers.constants.AddressZero,
|
|
259
257
|
ethers.constants.AddressZero,
|
|
260
258
|
ethers.constants.AddressZero,
|
|
261
|
-
ethers.constants.AddressZero,
|
|
262
|
-
ethers.constants.AddressZero,
|
|
263
259
|
ethers.constants.AddressZero
|
|
264
260
|
)
|
|
265
261
|
).revertedWith(/Initializable: contract is already initialized/);
|
|
@@ -304,17 +300,13 @@ describe("SuperGoodDollar", async function () {
|
|
|
304
300
|
|
|
305
301
|
expect(await sgd.getHost()).equal(newHost.address);
|
|
306
302
|
await expect(
|
|
307
|
-
sgd[
|
|
308
|
-
"initialize(string,string,uint256,address,address,address,address,address,address)"
|
|
309
|
-
](
|
|
303
|
+
sgd["initialize(string,string,uint256,address,address,address,address)"](
|
|
310
304
|
"x",
|
|
311
305
|
"y",
|
|
312
306
|
1,
|
|
313
307
|
ethers.constants.AddressZero,
|
|
314
308
|
ethers.constants.AddressZero,
|
|
315
309
|
ethers.constants.AddressZero,
|
|
316
|
-
ethers.constants.AddressZero,
|
|
317
|
-
ethers.constants.AddressZero,
|
|
318
310
|
ethers.constants.AddressZero
|
|
319
311
|
)
|
|
320
312
|
).revertedWith(/Initializable: contract is already initialized/);
|
|
@@ -235,7 +235,7 @@ describe("UBIScheme - network e2e tests", () => {
|
|
|
235
235
|
);
|
|
236
236
|
});
|
|
237
237
|
|
|
238
|
-
it("should not be able to fish an active user", async () => {
|
|
238
|
+
it.skip("should not be able to fish an active user", async () => {
|
|
239
239
|
let error = await ubi
|
|
240
240
|
.connect(fisherman)
|
|
241
241
|
.fish(claimer.address)
|
|
@@ -244,7 +244,7 @@ describe("UBIScheme - network e2e tests", () => {
|
|
|
244
244
|
expect(error.message).to.have.string("can't fish");
|
|
245
245
|
});
|
|
246
246
|
|
|
247
|
-
it("should be able to fish inactive user", async () => {
|
|
247
|
+
it.skip("should be able to fish inactive user", async () => {
|
|
248
248
|
await increaseTime(MAX_INACTIVE_DAYS * 86700);
|
|
249
249
|
let balance1 = await goodDollar.balanceOf(fisherman.address);
|
|
250
250
|
await ubi.connect(fisherman).fish(claimer.address);
|
|
@@ -257,7 +257,7 @@ describe("UBIScheme - network e2e tests", () => {
|
|
|
257
257
|
);
|
|
258
258
|
});
|
|
259
259
|
|
|
260
|
-
it("should not be able to fish the same user twice", async () => {
|
|
260
|
+
it.skip("should not be able to fish the same user twice", async () => {
|
|
261
261
|
let error = await ubi
|
|
262
262
|
.connect(fisherman)
|
|
263
263
|
.fish(claimer.address)
|
|
@@ -265,7 +265,7 @@ describe("UBIScheme - network e2e tests", () => {
|
|
|
265
265
|
expect(error.message).to.have.string("can't fish");
|
|
266
266
|
});
|
|
267
267
|
|
|
268
|
-
it("should recieves a claim reward when call claim after being fished", async () => {
|
|
268
|
+
it.skip("should recieves a claim reward when call claim after being fished", async () => {
|
|
269
269
|
let activeUsersCountBefore = await ubi.activeUsersCount();
|
|
270
270
|
let claimerBalanceBefore = await goodDollar.balanceOf(claimer.address);
|
|
271
271
|
await ubi.connect(claimer).claim();
|
|
@@ -279,7 +279,7 @@ describe("UBIScheme - network e2e tests", () => {
|
|
|
279
279
|
).to.be.equal(1000);
|
|
280
280
|
});
|
|
281
281
|
|
|
282
|
-
it("should be able to fish by calling fishMulti", async () => {
|
|
282
|
+
it.skip("should be able to fish by calling fishMulti", async () => {
|
|
283
283
|
await increaseTime(MAX_INACTIVE_DAYS * 86700);
|
|
284
284
|
let amount = 1e8;
|
|
285
285
|
await dai["mint(address,uint256)"](
|
|
@@ -13,10 +13,19 @@ const ONE_DAY = 86400;
|
|
|
13
13
|
describe("UBIScheme cycle", () => {
|
|
14
14
|
let goodDollar, firstClaimPool;
|
|
15
15
|
let reputation;
|
|
16
|
-
let root,
|
|
16
|
+
let root,
|
|
17
|
+
acct,
|
|
18
|
+
claimer1,
|
|
19
|
+
claimer2,
|
|
20
|
+
claimer3,
|
|
21
|
+
signers,
|
|
22
|
+
nameService,
|
|
23
|
+
genericCall,
|
|
24
|
+
ubiScheme: UBIScheme;
|
|
17
25
|
|
|
18
26
|
before(async () => {
|
|
19
|
-
[root, acct, claimer1, claimer2, claimer3, ...signers] =
|
|
27
|
+
[root, acct, claimer1, claimer2, claimer3, ...signers] =
|
|
28
|
+
await ethers.getSigners();
|
|
20
29
|
|
|
21
30
|
const deployedDAO = await loadFixture(createDAO);
|
|
22
31
|
let {
|
|
@@ -55,7 +64,9 @@ describe("UBIScheme cycle", () => {
|
|
|
55
64
|
|
|
56
65
|
it("should be able to change cycleLength if avatar", async () => {
|
|
57
66
|
// initializing the ubi
|
|
58
|
-
let encodedCall = ubiScheme.interface.encodeFunctionData("setCycleLength", [
|
|
67
|
+
let encodedCall = ubiScheme.interface.encodeFunctionData("setCycleLength", [
|
|
68
|
+
8
|
|
69
|
+
]);
|
|
59
70
|
await genericCall(ubiScheme.address, encodedCall);
|
|
60
71
|
expect(await ubiScheme.cycleLength()).to.be.equal(8);
|
|
61
72
|
});
|
|
@@ -70,7 +81,10 @@ describe("UBIScheme cycle", () => {
|
|
|
70
81
|
|
|
71
82
|
it("should set ubischeme", async () => {
|
|
72
83
|
// initializing the ubi
|
|
73
|
-
let encodedCall = firstClaimPool.interface.encodeFunctionData(
|
|
84
|
+
let encodedCall = firstClaimPool.interface.encodeFunctionData(
|
|
85
|
+
"setUBIScheme",
|
|
86
|
+
[ubiScheme.address]
|
|
87
|
+
);
|
|
74
88
|
|
|
75
89
|
await genericCall(firstClaimPool.address, encodedCall);
|
|
76
90
|
// await firstClaimPool.start();
|
|
@@ -78,13 +92,21 @@ describe("UBIScheme cycle", () => {
|
|
|
78
92
|
|
|
79
93
|
it("should calculate cycle on first day", async () => {
|
|
80
94
|
await increaseTime(2 * ONE_DAY); //make sure
|
|
95
|
+
|
|
96
|
+
let balance = await goodDollar.balanceOf(ubiScheme.address);
|
|
81
97
|
let transaction = await (await ubiScheme.connect(claimer1).claim()).wait();
|
|
82
|
-
await ubiScheme.connect(claimer2).claim();
|
|
83
98
|
let cycleLength = await ubiScheme.cycleLength();
|
|
84
99
|
let currentCycle = await ubiScheme.currentCycleLength();
|
|
85
|
-
let
|
|
100
|
+
let dailyAmount = await ubiScheme.dailyUbi();
|
|
86
101
|
expect(currentCycle.toNumber()).to.be.gt(0);
|
|
87
|
-
const cycleEvent = transaction.events.find(
|
|
102
|
+
const cycleEvent = transaction.events.find(
|
|
103
|
+
e => e.event === "UBICycleCalculated"
|
|
104
|
+
);
|
|
105
|
+
console.log({
|
|
106
|
+
dailyAmount: dailyAmount.toString(),
|
|
107
|
+
event: cycleEvent.args
|
|
108
|
+
});
|
|
109
|
+
|
|
88
110
|
expect(cycleEvent.args.day.toNumber()).to.be.a("number");
|
|
89
111
|
expect(cycleEvent.args.pool).to.be.equal(balance);
|
|
90
112
|
expect(cycleEvent.args.cycleLength).to.be.equal(cycleLength);
|
|
@@ -92,35 +114,53 @@ describe("UBIScheme cycle", () => {
|
|
|
92
114
|
});
|
|
93
115
|
|
|
94
116
|
it("should have calculated dailyCyclePool and dailyUbi correctly", async () => {
|
|
117
|
+
await ubiScheme.connect(claimer2).claim();
|
|
95
118
|
increaseTime(ONE_DAY);
|
|
96
119
|
let transaction = await ubiScheme.connect(claimer2).claim();
|
|
97
|
-
expect(
|
|
98
|
-
|
|
99
|
-
); //first day
|
|
100
|
-
expect(
|
|
101
|
-
|
|
120
|
+
expect(
|
|
121
|
+
await goodDollar.balanceOf(claimer2.address).then(_ => _.toNumber())
|
|
122
|
+
).to.be.equal(125 + (await ubiScheme.dailyUbi().then(_ => _.toNumber()))); //first day 125 , second claim 125000 wei daily pool divided by 1000 active users = 125
|
|
123
|
+
expect(
|
|
124
|
+
await ubiScheme.dailyCyclePool().then(_ => _.toNumber())
|
|
125
|
+
).to.be.equal(125000);
|
|
126
|
+
expect(
|
|
127
|
+
await ubiScheme.currentDayInCycle().then(_ => _.toNumber())
|
|
128
|
+
).to.be.equal(1); //1 day passed
|
|
102
129
|
});
|
|
103
130
|
|
|
104
131
|
it("should calculate next cycle even if day passed without claims(setDay)", async () => {
|
|
105
132
|
increaseTime(ONE_DAY * 9);
|
|
106
|
-
expect(
|
|
133
|
+
expect(
|
|
134
|
+
await ubiScheme.currentDayInCycle().then(_ => _.toNumber())
|
|
135
|
+
).to.be.equal(10); //10 days passed total
|
|
107
136
|
|
|
108
137
|
let transaction = await (await ubiScheme.connect(claimer1).claim()).wait(); //claims in new ubi cycle
|
|
109
138
|
let dailyClaimAmount = (await ubiScheme.dailyCyclePool()).div(1000); //initialy we have by default min 1000 active users
|
|
110
139
|
|
|
111
|
-
expect(await goodDollar.balanceOf(claimer1.address)).to.be.equal(
|
|
112
|
-
|
|
140
|
+
expect(await goodDollar.balanceOf(claimer1.address)).to.be.equal(
|
|
141
|
+
dailyClaimAmount.add(125)
|
|
142
|
+
); //intial 10 from first claim pool + daily
|
|
143
|
+
const cycleEvent = transaction.events.find(
|
|
144
|
+
e => e.event === "UBICycleCalculated"
|
|
145
|
+
);
|
|
113
146
|
|
|
114
147
|
expect(cycleEvent).to.be.not.empty;
|
|
115
148
|
|
|
116
|
-
expect(
|
|
117
|
-
|
|
118
|
-
|
|
149
|
+
expect(
|
|
150
|
+
await ubiScheme.currentDayInCycle().then(_ => _.toNumber())
|
|
151
|
+
).to.be.equal(0); //new cycle started
|
|
152
|
+
//intial balance on cycle start 1000000 - 375(3 user that claimed in previous tests) = 99625, divide by cycle length (8) = 124953
|
|
153
|
+
expect(cycleEvent.args.dailyUBIPool).to.be.equal(
|
|
154
|
+
(BigInt(1000000) - BigInt(375)) / BigInt(8)
|
|
155
|
+
);
|
|
119
156
|
});
|
|
120
157
|
|
|
121
158
|
it("should calculate cycle early if we can increase current daily pool", async () => {
|
|
122
159
|
//increase ubi pool balance
|
|
123
|
-
let encoded = goodDollar.interface.encodeFunctionData("mint", [
|
|
160
|
+
let encoded = goodDollar.interface.encodeFunctionData("mint", [
|
|
161
|
+
ubiScheme.address,
|
|
162
|
+
400000
|
|
163
|
+
]);
|
|
124
164
|
await genericCall(goodDollar.address, encoded);
|
|
125
165
|
let balance = await goodDollar.balanceOf(ubiScheme.address);
|
|
126
166
|
|
|
@@ -133,7 +173,9 @@ describe("UBIScheme cycle", () => {
|
|
|
133
173
|
const estimated = await ubiScheme.estimateNextDailyUBI();
|
|
134
174
|
await increaseTime(ONE_DAY); //make sure
|
|
135
175
|
let transaction = await (await ubiScheme.connect(claimer1).claim()).wait();
|
|
136
|
-
const cycleEvent = transaction.events.find(
|
|
176
|
+
const cycleEvent = transaction.events.find(
|
|
177
|
+
e => e.event === "UBICycleCalculated"
|
|
178
|
+
);
|
|
137
179
|
const dailyUBI = await ubiScheme.dailyUbi();
|
|
138
180
|
expect(dailyUBI).to.eq(estimated); //the estimated before actual calculation should be correct, ie equal to actual dailyUBI calculated after first claim.
|
|
139
181
|
expect(cycleEvent).to.be.not.empty;
|
|
@@ -145,7 +187,10 @@ describe("UBIScheme cycle", () => {
|
|
|
145
187
|
|
|
146
188
|
it("should not calculate cycle early if not possible to increase daily ubi pool", async () => {
|
|
147
189
|
//increase ubi pool balance
|
|
148
|
-
let encoded = goodDollar.interface.encodeFunctionData("mint", [
|
|
190
|
+
let encoded = goodDollar.interface.encodeFunctionData("mint", [
|
|
191
|
+
ubiScheme.address,
|
|
192
|
+
100
|
|
193
|
+
]);
|
|
149
194
|
await genericCall(goodDollar.address, encoded);
|
|
150
195
|
let balance = await goodDollar.balanceOf(ubiScheme.address);
|
|
151
196
|
const curCycleLen = await ubiScheme.cycleLength();
|
|
@@ -155,7 +200,9 @@ describe("UBIScheme cycle", () => {
|
|
|
155
200
|
|
|
156
201
|
await increaseTime(ONE_DAY); //make sure
|
|
157
202
|
let transaction = await (await ubiScheme.connect(claimer1).claim()).wait();
|
|
158
|
-
const cycleEvent = transaction.events.find(
|
|
203
|
+
const cycleEvent = transaction.events.find(
|
|
204
|
+
e => e.event === "UBICycleCalculated"
|
|
205
|
+
);
|
|
159
206
|
expect(cycleEvent).to.be.undefined;
|
|
160
207
|
});
|
|
161
208
|
});
|