@gooddollar/goodprotocol 2.0.34-beta.2 → 2.0.34-beta.4
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/GenericDistributionHelper.min.json +1 -0
- package/artifacts/abis/INonfungiblePositionManager.min.json +1 -0
- package/artifacts/abis/IUniswapV3Pool.min.json +1 -0
- 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/IUniswapV3.sol/INonfungiblePositionManager.dbg.json +4 -0
- package/artifacts/contracts/IUniswapV3.sol/INonfungiblePositionManager.json +102 -0
- package/artifacts/contracts/IUniswapV3.sol/IUniswapV3Pool.dbg.json +4 -0
- package/artifacts/contracts/IUniswapV3.sol/IUniswapV3Pool.json +93 -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/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/SuperfluidFacuet.sol/SuperfluidFaucet.dbg.json +1 -1
- package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
- package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
- package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IStakingUpgrade.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/RewardsMinter.dbg.json +1 -1
- package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/MultiBaseGovernanceShareField.sol/MultiBaseGovernanceShareField.dbg.json +1 -1
- package/artifacts/contracts/governance/Reputation.sol/Reputation.dbg.json +1 -1
- package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
- package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
- package/artifacts/contracts/identity/IdentityV3.sol/IdentityV3.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +1 -1
- package/artifacts/contracts/invite/OneTimeReward.sol/OneTimeReward.dbg.json +1 -1
- package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/IWrapper.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
- package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
- package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
- package/artifacts/contracts/reserve/CeloDistributionHelper.sol/CeloDistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/GenericDistributionHelper.sol/GenericDistributionHelper.dbg.json +4 -0
- package/artifacts/contracts/reserve/GenericDistributionHelper.sol/GenericDistributionHelper.json +931 -0
- package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodReserveCDai.sol/ContributionCalc.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
- package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.dbg.json +1 -1
- package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.dbg.json +1 -1
- package/artifacts/contracts/staking/SimpleStaking.sol/SimpleStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/SimpleStakingV2.sol/SimpleStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.dbg.json +1 -1
- package/artifacts/contracts/staking/utils/StakingRewardsFixedAPY.sol/StakingRewardsFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.dbg.json +1 -1
- package/artifacts/contracts/token/ERC677.sol/ERC677.dbg.json +1 -1
- package/artifacts/contracts/token/ERC677.sol/ERC677Receiver.dbg.json +1 -1
- package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/GoodDollar2.sol/GoodDollar2.dbg.json +1 -1
- package/artifacts/contracts/token/IFeesFormula.sol/IFeesFormula.dbg.json +1 -1
- package/artifacts/contracts/token/MultichainFeeFormula.sol/MultichainFeeFormula.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ERC20Permit.sol/ERC20Permit.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ERC20Permit.sol/SelfApprove.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/IGoodDollarCustom.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/ISuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperToken.sol/ISuperToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperfluidToken.sol/SuperfluidToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxiable.sol/UUPSProxiable.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/Proxy.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.json +7 -2
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.dbg.json +1 -1
- package/artifacts/contracts/utils/BulkProof.sol/BulkProof.dbg.json +1 -1
- package/artifacts/contracts/utils/BulkWhitelist.sol/BulkWhitelist.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyFromReserveHelper.sol/BuyFromReserveHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/DonateGDClone.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOContract.sol/DAOContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DSMath.sol/DSMath.dbg.json +1 -1
- package/artifacts/contracts/utils/DataTypes.sol/DataTypes.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/EternalStorage.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/FuseOldBridgeKill.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/IUpgradeabilityOwnerStorage.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Initializable.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Ownable.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Upgradeable.dbg.json +1 -1
- package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/IRouter.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/PausableControl.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.dbg.json +1 -1
- package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.dbg.json +1 -1
- package/artifacts/contracts/utils/LastauthReduction.sol/LastauthReduction.dbg.json +1 -1
- package/artifacts/contracts/utils/MultiCall.sol/Multicall.dbg.json +1 -1
- package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/NameService.sol/NameService.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtoclUpgradeV4Mento.sol/MentoExchange.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtoclUpgradeV4Mento.sol/ProtocolUpgradeV4Mento.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/OldMarketMaker.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.dbg.json +1 -1
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.dbg.json +1 -1
- package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/ReserveRestore.sol/ReserveRestore.dbg.json +1 -1
- package/contracts/IQuoter.sol +108 -0
- package/contracts/IUniswapV3.sol +51 -0
- package/contracts/reserve/GenericDistributionHelper.sol +319 -0
- package/contracts/ubi/UBISchemeV2.sol +8 -4
- package/dist/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.json +2 -2
- package/dist/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +179 -186
- 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 +14 -6
- package/package.json +1 -1
- package/releases/deploy-settings.json +15 -2
- package/releases/deployment.json +66 -45
- package/releases/olddao.json +1 -1
- package/scripts/fv.ts +19 -1
- package/scripts/multichain-deploy/0_proxyFactory-deploy.ts +4 -3
- package/scripts/multichain-deploy/1_basicdao-deploy.ts +18 -9
- package/scripts/multichain-deploy/4_ubi-deploy.ts +1 -1
- package/scripts/multichain-deploy/8_disthelper-deploy.ts +152 -0
- package/scripts/multichain-deploy/createUniswapTestPools.ts +163 -0
- package/scripts/multichain-deploy/fulldeploy.sh +17 -17
- package/scripts/multichain-deploy/helpers.ts +76 -6
- package/scripts/multichain-deploy/verify.ts +41 -0
- package/scripts/proposals/gip-25-xdc-upgrade.ts +438 -0
- package/test/helpers.ts +1 -1
- package/test/ubi/UBISchemeV2.test.ts +35 -108
- package/types/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.ts +108 -0
- package/types/@openzeppelin/contracts/proxy/ERC1967/index.ts +1 -0
- package/types/@uniswap/index.ts +2 -0
- package/types/@uniswap/v2-periphery/contracts/index.ts +5 -0
- package/types/@uniswap/v2-periphery/contracts/interfaces/IWETH.ts +159 -0
- package/types/@uniswap/v2-periphery/contracts/interfaces/index.ts +4 -0
- package/types/@uniswap/v2-periphery/index.ts +5 -0
- package/types/contracts/IQuoter.sol/IQuoterV2.ts +297 -0
- package/types/contracts/IQuoter.sol/index.ts +4 -0
- package/types/contracts/IUniswapV3.sol/INonfungiblePositionManager.ts +151 -0
- package/types/contracts/IUniswapV3.sol/IUniswapV3Factory.ts +155 -0
- package/types/contracts/IUniswapV3.sol/IUniswapV3Pool.ts +179 -0
- package/types/contracts/IUniswapV3.sol/index.ts +5 -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/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/index.ts +4 -0
- package/types/contracts/mocks/CeloDistributionHelperTest.sol/DistributionHelperTestHelper.ts +1252 -0
- package/types/contracts/reserve/GenericDistributionHelper copy.sol/GenericDistributionHelper.ts +1247 -0
- package/types/contracts/reserve/GenericDistributionHelper copy.sol/index.ts +4 -0
- package/types/contracts/reserve/GenericDistributionHelper.ts +1304 -0
- package/types/contracts/reserve/GoodReserveADai.ts +2212 -0
- package/types/contracts/reserve/index.ts +1 -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/ubi/UBISchemeV2.ts +14 -3
- 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/factories/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy__factory.ts +146 -0
- package/types/factories/@openzeppelin/contracts/proxy/ERC1967/index.ts +1 -0
- package/types/factories/@uniswap/index.ts +1 -0
- package/types/factories/@uniswap/v2-periphery/contracts/index.ts +4 -0
- package/types/factories/@uniswap/v2-periphery/contracts/interfaces/IWETH__factory.ts +67 -0
- package/types/factories/@uniswap/v2-periphery/contracts/interfaces/index.ts +4 -0
- package/types/factories/@uniswap/v2-periphery/index.ts +4 -0
- 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/IUniswapV3.sol/INonfungiblePositionManager__factory.ts +121 -0
- package/types/factories/contracts/IUniswapV3.sol/IUniswapV3Factory__factory.ts +84 -0
- package/types/factories/contracts/IUniswapV3.sol/IUniswapV3Pool__factory.ts +108 -0
- package/types/factories/contracts/IUniswapV3.sol/index.ts +5 -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/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/index.ts +2 -0
- package/types/factories/contracts/mocks/CeloDistributionHelperTest.sol/DistributionHelperTestHelper__factory.ts +929 -0
- package/types/factories/contracts/reserve/GenericDistributionHelper copy.sol/GenericDistributionHelper__factory.ts +935 -0
- package/types/factories/contracts/reserve/GenericDistributionHelper copy.sol/index.ts +4 -0
- package/types/factories/contracts/reserve/GenericDistributionHelper__factory.ts +987 -0
- package/types/factories/contracts/reserve/GoodReserveADai__factory.ts +1502 -0
- package/types/factories/contracts/reserve/index.ts +1 -0
- 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/token/GoodDollar18__factory.ts +1257 -0
- package/types/factories/contracts/ubi/UBISchemeV2__factory.ts +6 -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/FuseOldBridgeKill.sol/BasicAMBErc677ToErc677__factory.ts +86 -0
- 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/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/hardhat.d.ts +54 -0
- package/types/index.ts +10 -2
|
@@ -13,15 +13,7 @@ const ONE_DAY = 86400;
|
|
|
13
13
|
const ONE_HOUR = 3600;
|
|
14
14
|
|
|
15
15
|
describe("UBISchemeV2", () => {
|
|
16
|
-
let goodDollar,
|
|
17
|
-
identity,
|
|
18
|
-
formula,
|
|
19
|
-
avatar,
|
|
20
|
-
ubi: UBISchemeV2,
|
|
21
|
-
controller,
|
|
22
|
-
firstClaimPool,
|
|
23
|
-
setSchemes,
|
|
24
|
-
addWhitelisted;
|
|
16
|
+
let goodDollar, identity, formula, avatar, ubi: UBISchemeV2, controller, firstClaimPool, setSchemes, addWhitelisted;
|
|
25
17
|
let reputation;
|
|
26
18
|
let root,
|
|
27
19
|
claimer1,
|
|
@@ -39,19 +31,8 @@ describe("UBISchemeV2", () => {
|
|
|
39
31
|
ubiScheme;
|
|
40
32
|
|
|
41
33
|
before(async () => {
|
|
42
|
-
[
|
|
43
|
-
|
|
44
|
-
claimer1,
|
|
45
|
-
claimer2,
|
|
46
|
-
claimer3,
|
|
47
|
-
claimer4,
|
|
48
|
-
claimer5,
|
|
49
|
-
claimer6,
|
|
50
|
-
claimer7,
|
|
51
|
-
claimer8,
|
|
52
|
-
fisherman,
|
|
53
|
-
...signers
|
|
54
|
-
] = await ethers.getSigners();
|
|
34
|
+
[root, claimer1, claimer2, claimer3, claimer4, claimer5, claimer6, claimer7, claimer8, fisherman, ...signers] =
|
|
35
|
+
await ethers.getSigners();
|
|
55
36
|
const fcFactory = new ethers.ContractFactory(
|
|
56
37
|
FirstClaimPool.abi,
|
|
57
38
|
FirstClaimPool.bytecode,
|
|
@@ -89,27 +70,24 @@ describe("UBISchemeV2", () => {
|
|
|
89
70
|
});
|
|
90
71
|
|
|
91
72
|
async function deployNewUbi() {
|
|
92
|
-
return await upgrades.deployProxy(
|
|
93
|
-
await ethers.getContractFactory("UBISchemeV2"),
|
|
94
|
-
[nameService.address]
|
|
95
|
-
);
|
|
73
|
+
return await upgrades.deployProxy(await ethers.getContractFactory("UBISchemeV2"), [nameService.address, 1000]);
|
|
96
74
|
}
|
|
97
75
|
|
|
98
76
|
it("should not accept 0 inactive days in the constructor", async () => {
|
|
99
77
|
let ubi1 = await (await ethers.getContractFactory("UBIScheme")).deploy();
|
|
100
78
|
|
|
101
|
-
await expect(
|
|
102
|
-
|
|
103
|
-
)
|
|
79
|
+
await expect(ubi1.initialize(nameService.address, firstClaimPool.address, 0)).revertedWith(
|
|
80
|
+
/Max inactive days cannot be zero/
|
|
81
|
+
);
|
|
104
82
|
});
|
|
105
83
|
|
|
106
84
|
it("should deploy the ubi", async () => {
|
|
107
85
|
const block = await ethers.provider.getBlock("latest");
|
|
108
86
|
const startUBI = block.timestamp;
|
|
109
|
-
ubi = await upgrades.deployProxy(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
);
|
|
87
|
+
ubi = (await upgrades.deployProxy(await ethers.getContractFactory("UBISchemeV2"), [
|
|
88
|
+
nameService.address,
|
|
89
|
+
1000
|
|
90
|
+
])) as UBISchemeV2;
|
|
113
91
|
const periodStart = await ubi.periodStart();
|
|
114
92
|
// initializing the ubi
|
|
115
93
|
let encodedCall = ubi.interface.encodeFunctionData("setCycleLength", [1]);
|
|
@@ -167,10 +145,7 @@ describe("UBISchemeV2", () => {
|
|
|
167
145
|
});
|
|
168
146
|
|
|
169
147
|
it.skip("should set the ubi scheme by avatar", async () => {
|
|
170
|
-
let encodedCall = firstClaimPool.interface.encodeFunctionData(
|
|
171
|
-
"setUBIScheme",
|
|
172
|
-
[NULL_ADDRESS]
|
|
173
|
-
);
|
|
148
|
+
let encodedCall = firstClaimPool.interface.encodeFunctionData("setUBIScheme", [NULL_ADDRESS]);
|
|
174
149
|
await genericCall(firstClaimPool.address, encodedCall);
|
|
175
150
|
const newUbi = await firstClaimPool.ubi();
|
|
176
151
|
expect(newUbi.toString()).to.be.equal(NULL_ADDRESS);
|
|
@@ -186,10 +161,7 @@ describe("UBISchemeV2", () => {
|
|
|
186
161
|
expect(error.message).to.have.string("ubi has not initialized");
|
|
187
162
|
|
|
188
163
|
// initializing the ubi
|
|
189
|
-
let encodedCall = firstClaimPool.interface.encodeFunctionData(
|
|
190
|
-
"setUBIScheme",
|
|
191
|
-
[ubi.address]
|
|
192
|
-
);
|
|
164
|
+
let encodedCall = firstClaimPool.interface.encodeFunctionData("setUBIScheme", [ubi.address]);
|
|
193
165
|
await genericCall(firstClaimPool.address, encodedCall);
|
|
194
166
|
});
|
|
195
167
|
|
|
@@ -241,8 +213,7 @@ describe("UBISchemeV2", () => {
|
|
|
241
213
|
expect(amountClaimed.eq(100));
|
|
242
214
|
expect(activeUsersCount.toNumber()).to.be.equal(2);
|
|
243
215
|
expect(claimersCount.eq(2));
|
|
244
|
-
expect(transaction.events.find(_ => _.event === "ActivatedUser")).to.be.not
|
|
245
|
-
.empty;
|
|
216
|
+
expect(transaction.events.find(_ => _.event === "ActivatedUser")).to.be.not.empty;
|
|
246
217
|
});
|
|
247
218
|
|
|
248
219
|
it.skip("should not be able to fish a new user", async () => {
|
|
@@ -296,16 +267,10 @@ describe("UBISchemeV2", () => {
|
|
|
296
267
|
// in the ubi and in the next day after transferring the balances from the
|
|
297
268
|
// dao, making sure that the tokens that have not been claimed are
|
|
298
269
|
// taken by the formula as expected.
|
|
299
|
-
let encoded = goodDollar.interface.encodeFunctionData("transfer", [
|
|
300
|
-
signers[0].address,
|
|
301
|
-
"1000"
|
|
302
|
-
]);
|
|
270
|
+
let encoded = goodDollar.interface.encodeFunctionData("transfer", [signers[0].address, "1000"]);
|
|
303
271
|
|
|
304
272
|
await genericCall(goodDollar.address, encoded); // There is 10gd initially allocated to avatar so I send it to another address for further transactions
|
|
305
|
-
let encodedCall = ubi.interface.encodeFunctionData(
|
|
306
|
-
"setShouldWithdrawFromDAO",
|
|
307
|
-
[true]
|
|
308
|
-
);
|
|
273
|
+
let encodedCall = ubi.interface.encodeFunctionData("setShouldWithdrawFromDAO", [true]);
|
|
309
274
|
await genericCall(ubi.address, encodedCall); // we should set cyclelength to one cause this tests was implemented according to it
|
|
310
275
|
const currentDay = await ubi.currentDayInCycle().then(_ => _.toNumber());
|
|
311
276
|
await increaseTime(ONE_DAY);
|
|
@@ -358,12 +323,8 @@ describe("UBISchemeV2", () => {
|
|
|
358
323
|
let dailyUbi = await ubi.dailyUbi();
|
|
359
324
|
await ubi.connect(claimer4).claim();
|
|
360
325
|
let claimer4Balance3 = await goodDollar.balanceOf(claimer4.address);
|
|
361
|
-
expect(
|
|
362
|
-
|
|
363
|
-
).to.be.equal(dailyUbi.toNumber());
|
|
364
|
-
expect(
|
|
365
|
-
claimer4Balance3.toNumber() - claimer4Balance1.toNumber()
|
|
366
|
-
).to.be.equal(dailyUbi.toNumber());
|
|
326
|
+
expect(claimer4Balance2.toNumber() - claimer4Balance1.toNumber()).to.be.equal(dailyUbi.toNumber());
|
|
327
|
+
expect(claimer4Balance3.toNumber() - claimer4Balance1.toNumber()).to.be.equal(dailyUbi.toNumber());
|
|
367
328
|
});
|
|
368
329
|
|
|
369
330
|
it("should return the daily ubi for entitlement user", async () => {
|
|
@@ -390,11 +351,8 @@ describe("UBISchemeV2", () => {
|
|
|
390
351
|
let dailyUbi = await ubi.dailyUbi();
|
|
391
352
|
expect(isFishedBefore).to.be.false;
|
|
392
353
|
expect(isFishedAfter).to.be.true;
|
|
393
|
-
expect(tx.events.find(_ => _.event === "InactiveUserFished")).to.be.not
|
|
394
|
-
|
|
395
|
-
expect(
|
|
396
|
-
claimer4BalanceAfter.toNumber() - claimer4BalanceBefore.toNumber()
|
|
397
|
-
).to.be.equal(dailyUbi.toNumber());
|
|
354
|
+
expect(tx.events.find(_ => _.event === "InactiveUserFished")).to.be.not.empty;
|
|
355
|
+
expect(claimer4BalanceAfter.toNumber() - claimer4BalanceBefore.toNumber()).to.be.equal(dailyUbi.toNumber());
|
|
398
356
|
});
|
|
399
357
|
|
|
400
358
|
it.skip("should not be able to fish the same user twice", async () => {
|
|
@@ -411,27 +369,18 @@ describe("UBISchemeV2", () => {
|
|
|
411
369
|
expect(error.message).to.have.string("can't fish");
|
|
412
370
|
expect(isFishedBefore).to.be.true;
|
|
413
371
|
expect(isFishedAfter).to.be.true;
|
|
414
|
-
expect(claimer4BalanceAfter.toNumber()).to.be.equal(
|
|
415
|
-
claimer4BalanceBefore.toNumber()
|
|
416
|
-
);
|
|
372
|
+
expect(claimer4BalanceAfter.toNumber()).to.be.equal(claimer4BalanceBefore.toNumber());
|
|
417
373
|
});
|
|
418
374
|
it.skip("should be able to fish multiple user", async () => {
|
|
419
375
|
await goodDollar.mint(avatar, "20");
|
|
420
376
|
await increaseTime(MAX_INACTIVE_DAYS * ONE_DAY);
|
|
421
377
|
let claimer4BalanceBefore = await goodDollar.balanceOf(claimer4.address);
|
|
422
|
-
let tx = await (
|
|
423
|
-
await ubi
|
|
424
|
-
.connect(claimer4)
|
|
425
|
-
.fishMulti([claimer2.address, claimer3.address])
|
|
426
|
-
).wait();
|
|
378
|
+
let tx = await (await ubi.connect(claimer4).fishMulti([claimer2.address, claimer3.address])).wait();
|
|
427
379
|
let claimer4BalanceAfter = await goodDollar.balanceOf(claimer4.address);
|
|
428
380
|
let dailyUbi = await ubi.dailyUbi();
|
|
429
381
|
const totalFishedEvent = tx.events.find(e => e.event === "TotalFished");
|
|
430
|
-
expect(tx.events.find(e => e.event === "InactiveUserFished")).to.be.not
|
|
431
|
-
|
|
432
|
-
expect(
|
|
433
|
-
claimer4BalanceAfter.toNumber() - claimer4BalanceBefore.toNumber()
|
|
434
|
-
).to.be.equal(2 * dailyUbi.toNumber());
|
|
382
|
+
expect(tx.events.find(e => e.event === "InactiveUserFished")).to.be.not.empty;
|
|
383
|
+
expect(claimer4BalanceAfter.toNumber() - claimer4BalanceBefore.toNumber()).to.be.equal(2 * dailyUbi.toNumber());
|
|
435
384
|
expect(totalFishedEvent.args.total.toNumber() === 2).to.be.true;
|
|
436
385
|
});
|
|
437
386
|
|
|
@@ -450,9 +399,7 @@ describe("UBISchemeV2", () => {
|
|
|
450
399
|
expect(error.message).to.have.string("can't fish");
|
|
451
400
|
expect(isFishedBefore).to.be.false;
|
|
452
401
|
expect(isFishedAfter).to.be.false;
|
|
453
|
-
expect(claimer4BalanceAfter.toNumber()).to.be.equal(
|
|
454
|
-
claimer4BalanceBefore.toNumber()
|
|
455
|
-
);
|
|
402
|
+
expect(claimer4BalanceAfter.toNumber()).to.be.equal(claimer4BalanceBefore.toNumber());
|
|
456
403
|
});
|
|
457
404
|
|
|
458
405
|
it.skip("should be able to remove an inactive user that no longer whitelisted", async () => {
|
|
@@ -466,11 +413,8 @@ describe("UBISchemeV2", () => {
|
|
|
466
413
|
let dailyUbi = await ubi.dailyUbi();
|
|
467
414
|
expect(isFishedBefore).to.be.false;
|
|
468
415
|
expect(isFishedAfter).to.be.true;
|
|
469
|
-
expect(tx.events.find(e => e.event === "InactiveUserFished")).to.be.not
|
|
470
|
-
|
|
471
|
-
expect(
|
|
472
|
-
claimer4BalanceAfter.toNumber() - claimer4BalanceBefore.toNumber()
|
|
473
|
-
).to.be.equal(dailyUbi.toNumber());
|
|
416
|
+
expect(tx.events.find(e => e.event === "InactiveUserFished")).to.be.not.empty;
|
|
417
|
+
expect(claimer4BalanceAfter.toNumber() - claimer4BalanceBefore.toNumber()).to.be.equal(dailyUbi.toNumber());
|
|
474
418
|
});
|
|
475
419
|
|
|
476
420
|
it.skip("should be able to fish user that removed from the whitelist", async () => {
|
|
@@ -487,11 +431,8 @@ describe("UBISchemeV2", () => {
|
|
|
487
431
|
let dailyUbi = await ubi.dailyUbi();
|
|
488
432
|
expect(isFishedBefore).to.be.false;
|
|
489
433
|
expect(isFishedAfter).to.be.true;
|
|
490
|
-
expect(tx.events.find(e => e.event === "InactiveUserFished")).to.be.not
|
|
491
|
-
|
|
492
|
-
expect(
|
|
493
|
-
claimer4BalanceAfter.toNumber() - claimer4BalanceBefore.toNumber()
|
|
494
|
-
).to.be.equal(dailyUbi.toNumber());
|
|
434
|
+
expect(tx.events.find(e => e.event === "InactiveUserFished")).to.be.not.empty;
|
|
435
|
+
expect(claimer4BalanceAfter.toNumber() - claimer4BalanceBefore.toNumber()).to.be.equal(dailyUbi.toNumber());
|
|
495
436
|
});
|
|
496
437
|
|
|
497
438
|
it.skip("should recieves a claim reward on claim after removed and added again to the whitelist", async () => {
|
|
@@ -505,12 +446,8 @@ describe("UBISchemeV2", () => {
|
|
|
505
446
|
let activeUsersCountAfter = await ubi.activeUsersCount();
|
|
506
447
|
expect(isFishedBefore).to.be.true;
|
|
507
448
|
expect(isFishedAfter).to.be.false;
|
|
508
|
-
expect(
|
|
509
|
-
|
|
510
|
-
).to.be.equal(1);
|
|
511
|
-
expect(
|
|
512
|
-
claimerBalanceAfter.toNumber() - claimerBalanceBefore.toNumber()
|
|
513
|
-
).to.be.equal(100);
|
|
449
|
+
expect(activeUsersCountAfter.toNumber() - activeUsersCountBefore.toNumber()).to.be.equal(1);
|
|
450
|
+
expect(claimerBalanceAfter.toNumber() - claimerBalanceBefore.toNumber()).to.be.equal(100);
|
|
514
451
|
});
|
|
515
452
|
|
|
516
453
|
it("distribute formula should return correct value", async () => {
|
|
@@ -544,9 +481,7 @@ describe("UBISchemeV2", () => {
|
|
|
544
481
|
expect(ubiBalance.div(activeUsersCount).toNumber()).to.be.equal(
|
|
545
482
|
claimer4BalanceAfter.toNumber() - claimer4BalanceBefore.toNumber()
|
|
546
483
|
);
|
|
547
|
-
expect(ubiBalance.div(activeUsersCount).toNumber()).to.be.equal(
|
|
548
|
-
dailyUbi.toNumber()
|
|
549
|
-
);
|
|
484
|
+
expect(ubiBalance.div(activeUsersCount).toNumber()).to.be.equal(dailyUbi.toNumber());
|
|
550
485
|
});
|
|
551
486
|
|
|
552
487
|
it("should calcualte the correct distribution formula and transfer the correct amount when the ubi has a large amount of tokens", async () => {
|
|
@@ -564,9 +499,7 @@ describe("UBISchemeV2", () => {
|
|
|
564
499
|
let dailyCyclePool = await ubi.dailyCyclePool();
|
|
565
500
|
let activeUsersCount = await ubi.minActiveUsers(); // await ubi.activeUsersCount();
|
|
566
501
|
// the dailyCyclePool divided by max(activeUser,minActiveUsers) should give the daily claim (diff between ubipool balances)
|
|
567
|
-
expect(claimer1Balance2.sub(claimer1Balance1).toString()).to.be.equal(
|
|
568
|
-
dailyCyclePool.div(activeUsersCount)
|
|
569
|
-
);
|
|
502
|
+
expect(claimer1Balance2.sub(claimer1Balance1).toString()).to.be.equal(dailyCyclePool.div(activeUsersCount));
|
|
570
503
|
});
|
|
571
504
|
|
|
572
505
|
it.skip("should be able to iterate over all accounts if enough gas in fishMulti", async () => {
|
|
@@ -600,10 +533,7 @@ describe("UBISchemeV2", () => {
|
|
|
600
533
|
});
|
|
601
534
|
|
|
602
535
|
it.skip("should set the ubi claim amount by avatar", async () => {
|
|
603
|
-
let encodedCall = firstClaimPool.interface.encodeFunctionData(
|
|
604
|
-
"setClaimAmount",
|
|
605
|
-
[200]
|
|
606
|
-
);
|
|
536
|
+
let encodedCall = firstClaimPool.interface.encodeFunctionData("setClaimAmount", [200]);
|
|
607
537
|
|
|
608
538
|
await genericCall(firstClaimPool.address, encodedCall);
|
|
609
539
|
const claimAmount = await firstClaimPool.claimAmount();
|
|
@@ -611,10 +541,7 @@ describe("UBISchemeV2", () => {
|
|
|
611
541
|
});
|
|
612
542
|
|
|
613
543
|
it.skip("should set if withdraw from the dao or not", async () => {
|
|
614
|
-
let encodedCall = ubi.interface.encodeFunctionData(
|
|
615
|
-
"setShouldWithdrawFromDAO",
|
|
616
|
-
[false]
|
|
617
|
-
);
|
|
544
|
+
let encodedCall = ubi.interface.encodeFunctionData("setShouldWithdrawFromDAO", [false]);
|
|
618
545
|
await genericCall(ubi.address, encodedCall); // we should set cyclelength to one cause this tests was implemented according to it
|
|
619
546
|
const shouldWithdrawFromDAO = await ubi.shouldWithdrawFromDAO();
|
|
620
547
|
expect(shouldWithdrawFromDAO).to.be.equal(false);
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type { BaseContract, Signer, utils } from "ethers";
|
|
5
|
+
import type { EventFragment } from "@ethersproject/abi";
|
|
6
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
7
|
+
import type {
|
|
8
|
+
TypedEventFilter,
|
|
9
|
+
TypedEvent,
|
|
10
|
+
TypedListener,
|
|
11
|
+
OnEvent,
|
|
12
|
+
} from "../../../../common";
|
|
13
|
+
|
|
14
|
+
export interface ERC1967ProxyInterface extends utils.Interface {
|
|
15
|
+
functions: {};
|
|
16
|
+
|
|
17
|
+
events: {
|
|
18
|
+
"AdminChanged(address,address)": EventFragment;
|
|
19
|
+
"BeaconUpgraded(address)": EventFragment;
|
|
20
|
+
"Upgraded(address)": EventFragment;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment;
|
|
24
|
+
getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment;
|
|
25
|
+
getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface AdminChangedEventObject {
|
|
29
|
+
previousAdmin: string;
|
|
30
|
+
newAdmin: string;
|
|
31
|
+
}
|
|
32
|
+
export type AdminChangedEvent = TypedEvent<
|
|
33
|
+
[string, string],
|
|
34
|
+
AdminChangedEventObject
|
|
35
|
+
>;
|
|
36
|
+
|
|
37
|
+
export type AdminChangedEventFilter = TypedEventFilter<AdminChangedEvent>;
|
|
38
|
+
|
|
39
|
+
export interface BeaconUpgradedEventObject {
|
|
40
|
+
beacon: string;
|
|
41
|
+
}
|
|
42
|
+
export type BeaconUpgradedEvent = TypedEvent<
|
|
43
|
+
[string],
|
|
44
|
+
BeaconUpgradedEventObject
|
|
45
|
+
>;
|
|
46
|
+
|
|
47
|
+
export type BeaconUpgradedEventFilter = TypedEventFilter<BeaconUpgradedEvent>;
|
|
48
|
+
|
|
49
|
+
export interface UpgradedEventObject {
|
|
50
|
+
implementation: string;
|
|
51
|
+
}
|
|
52
|
+
export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>;
|
|
53
|
+
|
|
54
|
+
export type UpgradedEventFilter = TypedEventFilter<UpgradedEvent>;
|
|
55
|
+
|
|
56
|
+
export interface ERC1967Proxy extends BaseContract {
|
|
57
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
58
|
+
attach(addressOrName: string): this;
|
|
59
|
+
deployed(): Promise<this>;
|
|
60
|
+
|
|
61
|
+
interface: ERC1967ProxyInterface;
|
|
62
|
+
|
|
63
|
+
queryFilter<TEvent extends TypedEvent>(
|
|
64
|
+
event: TypedEventFilter<TEvent>,
|
|
65
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
66
|
+
toBlock?: string | number | undefined
|
|
67
|
+
): Promise<Array<TEvent>>;
|
|
68
|
+
|
|
69
|
+
listeners<TEvent extends TypedEvent>(
|
|
70
|
+
eventFilter?: TypedEventFilter<TEvent>
|
|
71
|
+
): Array<TypedListener<TEvent>>;
|
|
72
|
+
listeners(eventName?: string): Array<Listener>;
|
|
73
|
+
removeAllListeners<TEvent extends TypedEvent>(
|
|
74
|
+
eventFilter: TypedEventFilter<TEvent>
|
|
75
|
+
): this;
|
|
76
|
+
removeAllListeners(eventName?: string): this;
|
|
77
|
+
off: OnEvent<this>;
|
|
78
|
+
on: OnEvent<this>;
|
|
79
|
+
once: OnEvent<this>;
|
|
80
|
+
removeListener: OnEvent<this>;
|
|
81
|
+
|
|
82
|
+
functions: {};
|
|
83
|
+
|
|
84
|
+
callStatic: {};
|
|
85
|
+
|
|
86
|
+
filters: {
|
|
87
|
+
"AdminChanged(address,address)"(
|
|
88
|
+
previousAdmin?: null,
|
|
89
|
+
newAdmin?: null
|
|
90
|
+
): AdminChangedEventFilter;
|
|
91
|
+
AdminChanged(
|
|
92
|
+
previousAdmin?: null,
|
|
93
|
+
newAdmin?: null
|
|
94
|
+
): AdminChangedEventFilter;
|
|
95
|
+
|
|
96
|
+
"BeaconUpgraded(address)"(
|
|
97
|
+
beacon?: string | null
|
|
98
|
+
): BeaconUpgradedEventFilter;
|
|
99
|
+
BeaconUpgraded(beacon?: string | null): BeaconUpgradedEventFilter;
|
|
100
|
+
|
|
101
|
+
"Upgraded(address)"(implementation?: string | null): UpgradedEventFilter;
|
|
102
|
+
Upgraded(implementation?: string | null): UpgradedEventFilter;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
estimateGas: {};
|
|
106
|
+
|
|
107
|
+
populateTransaction: {};
|
|
108
|
+
}
|
package/types/@uniswap/index.ts
CHANGED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type {
|
|
5
|
+
BaseContract,
|
|
6
|
+
BigNumber,
|
|
7
|
+
BigNumberish,
|
|
8
|
+
BytesLike,
|
|
9
|
+
CallOverrides,
|
|
10
|
+
ContractTransaction,
|
|
11
|
+
Overrides,
|
|
12
|
+
PayableOverrides,
|
|
13
|
+
PopulatedTransaction,
|
|
14
|
+
Signer,
|
|
15
|
+
utils,
|
|
16
|
+
} from "ethers";
|
|
17
|
+
import type { FunctionFragment, Result } from "@ethersproject/abi";
|
|
18
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
19
|
+
import type {
|
|
20
|
+
TypedEventFilter,
|
|
21
|
+
TypedEvent,
|
|
22
|
+
TypedListener,
|
|
23
|
+
OnEvent,
|
|
24
|
+
} from "../../../../common";
|
|
25
|
+
|
|
26
|
+
export interface IWETHInterface extends utils.Interface {
|
|
27
|
+
functions: {
|
|
28
|
+
"deposit()": FunctionFragment;
|
|
29
|
+
"transfer(address,uint256)": FunctionFragment;
|
|
30
|
+
"withdraw(uint256)": FunctionFragment;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
getFunction(
|
|
34
|
+
nameOrSignatureOrTopic: "deposit" | "transfer" | "withdraw"
|
|
35
|
+
): FunctionFragment;
|
|
36
|
+
|
|
37
|
+
encodeFunctionData(functionFragment: "deposit", values?: undefined): string;
|
|
38
|
+
encodeFunctionData(
|
|
39
|
+
functionFragment: "transfer",
|
|
40
|
+
values: [string, BigNumberish]
|
|
41
|
+
): string;
|
|
42
|
+
encodeFunctionData(
|
|
43
|
+
functionFragment: "withdraw",
|
|
44
|
+
values: [BigNumberish]
|
|
45
|
+
): string;
|
|
46
|
+
|
|
47
|
+
decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
|
|
48
|
+
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
|
|
49
|
+
decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
|
|
50
|
+
|
|
51
|
+
events: {};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IWETH extends BaseContract {
|
|
55
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
56
|
+
attach(addressOrName: string): this;
|
|
57
|
+
deployed(): Promise<this>;
|
|
58
|
+
|
|
59
|
+
interface: IWETHInterface;
|
|
60
|
+
|
|
61
|
+
queryFilter<TEvent extends TypedEvent>(
|
|
62
|
+
event: TypedEventFilter<TEvent>,
|
|
63
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
64
|
+
toBlock?: string | number | undefined
|
|
65
|
+
): Promise<Array<TEvent>>;
|
|
66
|
+
|
|
67
|
+
listeners<TEvent extends TypedEvent>(
|
|
68
|
+
eventFilter?: TypedEventFilter<TEvent>
|
|
69
|
+
): Array<TypedListener<TEvent>>;
|
|
70
|
+
listeners(eventName?: string): Array<Listener>;
|
|
71
|
+
removeAllListeners<TEvent extends TypedEvent>(
|
|
72
|
+
eventFilter: TypedEventFilter<TEvent>
|
|
73
|
+
): this;
|
|
74
|
+
removeAllListeners(eventName?: string): this;
|
|
75
|
+
off: OnEvent<this>;
|
|
76
|
+
on: OnEvent<this>;
|
|
77
|
+
once: OnEvent<this>;
|
|
78
|
+
removeListener: OnEvent<this>;
|
|
79
|
+
|
|
80
|
+
functions: {
|
|
81
|
+
deposit(
|
|
82
|
+
overrides?: PayableOverrides & { from?: string }
|
|
83
|
+
): Promise<ContractTransaction>;
|
|
84
|
+
|
|
85
|
+
transfer(
|
|
86
|
+
to: string,
|
|
87
|
+
value: BigNumberish,
|
|
88
|
+
overrides?: Overrides & { from?: string }
|
|
89
|
+
): Promise<ContractTransaction>;
|
|
90
|
+
|
|
91
|
+
withdraw(
|
|
92
|
+
arg0: BigNumberish,
|
|
93
|
+
overrides?: Overrides & { from?: string }
|
|
94
|
+
): Promise<ContractTransaction>;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
deposit(
|
|
98
|
+
overrides?: PayableOverrides & { from?: string }
|
|
99
|
+
): Promise<ContractTransaction>;
|
|
100
|
+
|
|
101
|
+
transfer(
|
|
102
|
+
to: string,
|
|
103
|
+
value: BigNumberish,
|
|
104
|
+
overrides?: Overrides & { from?: string }
|
|
105
|
+
): Promise<ContractTransaction>;
|
|
106
|
+
|
|
107
|
+
withdraw(
|
|
108
|
+
arg0: BigNumberish,
|
|
109
|
+
overrides?: Overrides & { from?: string }
|
|
110
|
+
): Promise<ContractTransaction>;
|
|
111
|
+
|
|
112
|
+
callStatic: {
|
|
113
|
+
deposit(overrides?: CallOverrides): Promise<void>;
|
|
114
|
+
|
|
115
|
+
transfer(
|
|
116
|
+
to: string,
|
|
117
|
+
value: BigNumberish,
|
|
118
|
+
overrides?: CallOverrides
|
|
119
|
+
): Promise<boolean>;
|
|
120
|
+
|
|
121
|
+
withdraw(arg0: BigNumberish, overrides?: CallOverrides): Promise<void>;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
filters: {};
|
|
125
|
+
|
|
126
|
+
estimateGas: {
|
|
127
|
+
deposit(
|
|
128
|
+
overrides?: PayableOverrides & { from?: string }
|
|
129
|
+
): Promise<BigNumber>;
|
|
130
|
+
|
|
131
|
+
transfer(
|
|
132
|
+
to: string,
|
|
133
|
+
value: BigNumberish,
|
|
134
|
+
overrides?: Overrides & { from?: string }
|
|
135
|
+
): Promise<BigNumber>;
|
|
136
|
+
|
|
137
|
+
withdraw(
|
|
138
|
+
arg0: BigNumberish,
|
|
139
|
+
overrides?: Overrides & { from?: string }
|
|
140
|
+
): Promise<BigNumber>;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
populateTransaction: {
|
|
144
|
+
deposit(
|
|
145
|
+
overrides?: PayableOverrides & { from?: string }
|
|
146
|
+
): Promise<PopulatedTransaction>;
|
|
147
|
+
|
|
148
|
+
transfer(
|
|
149
|
+
to: string,
|
|
150
|
+
value: BigNumberish,
|
|
151
|
+
overrides?: Overrides & { from?: string }
|
|
152
|
+
): Promise<PopulatedTransaction>;
|
|
153
|
+
|
|
154
|
+
withdraw(
|
|
155
|
+
arg0: BigNumberish,
|
|
156
|
+
overrides?: Overrides & { from?: string }
|
|
157
|
+
): Promise<PopulatedTransaction>;
|
|
158
|
+
};
|
|
159
|
+
}
|