@gooddollar/goodprotocol 2.0.5-beta.0 → 2.0.5-beta.10
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/Faucet.min.json +1 -1
- package/artifacts/abis/FuseFaucetV2.min.json +1 -1
- package/artifacts/abis/IFirstClaimPool.min.json +1 -1
- package/artifacts/abis/IdentityFix.min.json +1 -0
- package/artifacts/abis/IdentityV2.min.json +1 -1
- package/artifacts/abis/InvitesFuseV2.min.json +1 -1
- package/artifacts/abis/OneTimePaymentsV2.min.json +1 -0
- package/artifacts/abis/UBISchemeV2.min.json +1 -0
- package/artifacts/contracts/DAOStackInterfaces.sol/Avatar.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/Controller.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/IntVoteInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/ReputationInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/SchemeRegistrar.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/AggregatorV3Interface.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ERC20.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IAaveIncentivesController.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IAdminWallet.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IDonationStaking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IERC2917.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.json +7 -0
- 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/IUBIScheme.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ProxyAdmin.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Reserve.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Uniswap.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/UniswapFactory.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/UniswapPair.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/cERC20.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.json +29 -10
- 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 +28 -2
- 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 +20 -2
- package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.json +15 -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/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.json +2 -2
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.json +2 -2
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.json +2 -2
- package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.json +2 -2
- package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/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/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/IWrapper.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.json +2 -2
- package/artifacts/contracts/mocks/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.json +2 -2
- package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.json +2 -2
- package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.json +2 -2
- package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.json +2 -2
- package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.json +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/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/FeesFormula.sol/IFeesFormula.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/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/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +2 -2
- package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperfluidToken.sol/SuperfluidToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxiable.sol/UUPSProxiable.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/Proxy.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/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 +4 -0
- package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.json +789 -0
- 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/BulkProof.sol/BulkProof.dbg.json +1 -1
- package/artifacts/contracts/utils/BulkProof.sol/BulkProof.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/DAOContract.sol/DAOContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOContract.sol/DAOContract.json +2 -2
- package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.json +2 -2
- package/artifacts/contracts/utils/DSMath.sol/DSMath.dbg.json +1 -1
- package/artifacts/contracts/utils/DataTypes.sol/DataTypes.dbg.json +1 -1
- package/artifacts/contracts/utils/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 +4 -0
- package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.json +60 -0
- package/artifacts/contracts/utils/MultiCall.sol/Multicall.dbg.json +1 -1
- package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.json +2 -2
- package/artifacts/contracts/utils/NameService.sol/NameService.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.json +2 -2
- package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.dbg.json +4 -0
- package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.json +316 -0
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/OldMarketMaker.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.json +2 -2
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.dbg.json +1 -1
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.dbg.json +1 -1
- package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.json +2 -2
- package/contracts/Interfaces.sol +46 -61
- package/contracts/fuseFaucet/Faucet.sol +22 -26
- package/contracts/fuseFaucet/FuseFaucetV2.sol +16 -9
- package/contracts/identity/IdentityV2.sol +52 -61
- package/contracts/invite/InvitesFuseV2.sol +21 -25
- package/contracts/invite/InvitesV2.sol +20 -30
- package/contracts/token/superfluid/SuperGoodDollar.sol +16 -22
- package/contracts/token/superfluid/UUPSProxy.sol +1 -1
- package/contracts/ubi/UBISchemeV2.sol +470 -0
- package/contracts/utils/IdentityFix.sol +31 -0
- package/contracts/utils/OneTimePaymentsV2.sol +172 -0
- package/hardhat.config.ts +11 -1
- package/package.json +11 -9
- package/releases/deploy-settings.json +6 -0
- package/releases/deployment.json +22 -4
- package/scripts/analytics/activeUsersCount.ts +56 -18
- package/scripts/analytics/whitelistsyncIssue.ts +87 -0
- package/scripts/multichain-deploy/1_basicdao-deploy.ts +34 -94
- package/scripts/multichain-deploy/2b_otp-deploy.ts +4 -4
- package/scripts/multichain-deploy/helpers.ts +25 -12
- package/scripts/proposals/gip-14_1.ts +251 -0
- package/scripts/proposals/gips-14_1.md +29 -0
- package/test/faucet/Faucet.test.ts +166 -130
- package/truffle-config.js +6 -0
- package/types/Faucet.ts +60 -29
- package/types/FuseFaucetV2.ts +50 -0
- package/types/IFirstClaimPool.ts +21 -0
- package/types/IdentityFix.ts +141 -0
- package/types/IdentityV2.ts +39 -0
- package/types/InvitesFuseV2.ts +28 -0
- package/types/OneTimePaymentsV2.ts +456 -0
- package/types/UBISchemeV2.ts +1192 -0
- package/types/factories/AaveStakingFactory__factory.ts +1 -1
- package/types/factories/AdminWalletFuse__factory.ts +1 -1
- package/types/factories/AdminWallet__factory.ts +1 -1
- package/types/factories/BaseShareFieldV2__factory.ts +1 -1
- package/types/factories/BaseShareField__factory.ts +1 -1
- package/types/factories/BuyAndBridgeHelper__factory.ts +1 -1
- package/types/factories/ClaimersDistribution__factory.ts +1 -1
- package/types/factories/CompoundStakingFactory__factory.ts +1 -1
- package/types/factories/CompoundVotingMachine__factory.ts +1 -1
- package/types/factories/DAOContract__factory.ts +1 -1
- package/types/factories/DAOUpgradeableContract__factory.ts +1 -1
- package/types/factories/DistributionBridgeMock__factory.ts +1 -1
- package/types/factories/DistributionHelperTestHelper__factory.ts +1 -1
- package/types/factories/DistributionHelperTest__factory.ts +1 -1
- package/types/factories/DistributionHelper__factory.ts +1 -1
- package/types/factories/DonationsStaking__factory.ts +1 -1
- package/types/factories/ExchangeHelper__factory.ts +1 -1
- package/types/factories/Faucet__factory.ts +28 -9
- package/types/factories/FuseFaucetV2__factory.ts +27 -1
- package/types/factories/FuseFaucet__factory.ts +1 -1
- package/types/factories/FuseStakingV3__factory.ts +1 -1
- package/types/factories/GReputation__factory.ts +1 -1
- package/types/factories/GoodAaveStakingV2__factory.ts +1 -1
- package/types/factories/GoodAaveStaking__factory.ts +1 -1
- package/types/factories/GoodCompoundStakingTest__factory.ts +1 -1
- package/types/factories/GoodCompoundStakingV2__factory.ts +1 -1
- package/types/factories/GoodCompoundStaking__factory.ts +1 -1
- package/types/factories/GoodDollarMintBurnWrapper__factory.ts +1 -1
- package/types/factories/GoodDollarStakingMock__factory.ts +1 -1
- package/types/factories/GoodDollarStaking__factory.ts +1 -1
- package/types/factories/GoodDollar__factory.ts +1 -1
- package/types/factories/GoodFundManagerTest__factory.ts +1 -1
- package/types/factories/GoodFundManager__factory.ts +1 -1
- package/types/factories/GoodMarketMaker__factory.ts +1 -1
- package/types/factories/GoodReserveCDai__factory.ts +1 -1
- package/types/factories/GovernanceStaking__factory.ts +1 -1
- package/types/factories/IFirstClaimPool__factory.ts +7 -0
- package/types/factories/IdentityFix__factory.ts +110 -0
- package/types/factories/IdentityMock__factory.ts +1 -1
- package/types/factories/IdentityV2__factory.ts +19 -1
- package/types/factories/InvitesFuseV2__factory.ts +14 -1
- package/types/factories/InvitesV1__factory.ts +1 -1
- package/types/factories/InvitesV2__factory.ts +1 -1
- package/types/factories/MultichainBridgeHelper__factory.ts +1 -1
- package/types/factories/MultichainRouterMock__factory.ts +1 -1
- package/types/factories/OneTimePaymentsV2__factory.ts +369 -0
- package/types/factories/OneTimePayments__factory.ts +1 -1
- package/types/factories/OverMintTesterRegularStake__factory.ts +1 -1
- package/types/factories/OverMintTester__factory.ts +1 -1
- package/types/factories/ProtocolUpgradeFuseRecover__factory.ts +1 -1
- package/types/factories/ProtocolUpgradeFuse__factory.ts +1 -1
- package/types/factories/ProtocolUpgradeRecover__factory.ts +1 -1
- package/types/factories/ProtocolUpgrade__factory.ts +1 -1
- package/types/factories/ReputationTestHelper__factory.ts +1 -1
- package/types/factories/Reputation__factory.ts +1 -1
- package/types/factories/StakersDistribution__factory.ts +1 -1
- package/types/factories/SuperGoodDollar__factory.ts +1 -1
- package/types/factories/SwapHelperTest__factory.ts +1 -1
- package/types/factories/UBISchemeV2__factory.ts +837 -0
- package/types/factories/UBIScheme__factory.ts +1 -1
- package/types/factories/UUPSProxy__factory.ts +1 -1
- package/types/factories/UniswapV2SwapHelper__factory.ts +1 -1
- package/types/factories/UpgradableMock2__factory.ts +1 -1
- package/types/factories/UpgradableMock3__factory.ts +1 -1
- package/types/factories/UpgradableMock4__factory.ts +1 -1
- package/types/factories/UpgradableMock__factory.ts +1 -1
- package/types/hardhat.d.ts +27 -0
- package/types/index.ts +6 -0
- package/yarn.lock +22499 -20151
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity >=0.8.0;
|
|
3
|
+
|
|
4
|
+
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
|
|
5
|
+
|
|
6
|
+
import "../Interfaces.sol";
|
|
7
|
+
import "./DAOContract.sol";
|
|
8
|
+
import "../utils/NameService.sol";
|
|
9
|
+
|
|
10
|
+
/* @title One Time payment scheme
|
|
11
|
+
* Scheme that allows address to deposit tokens for any address to withdraw
|
|
12
|
+
*/
|
|
13
|
+
contract OneTimePaymentsV2 is DAOContract {
|
|
14
|
+
struct Payment {
|
|
15
|
+
bool hasPayment;
|
|
16
|
+
uint256 paymentAmount;
|
|
17
|
+
address paymentSender;
|
|
18
|
+
address asset;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
mapping(address => Payment) public payments;
|
|
22
|
+
|
|
23
|
+
event PaymentDeposit(
|
|
24
|
+
address indexed from,
|
|
25
|
+
address paymentId,
|
|
26
|
+
uint256 amount,
|
|
27
|
+
address asset
|
|
28
|
+
);
|
|
29
|
+
event PaymentCancel(
|
|
30
|
+
address indexed from,
|
|
31
|
+
address paymentId,
|
|
32
|
+
uint256 amount,
|
|
33
|
+
address asset
|
|
34
|
+
);
|
|
35
|
+
event PaymentWithdraw(
|
|
36
|
+
address indexed from,
|
|
37
|
+
address indexed to,
|
|
38
|
+
address indexed paymentId,
|
|
39
|
+
uint256 amount,
|
|
40
|
+
address asset
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
/* @dev Constructor
|
|
44
|
+
* @param _avatar The avatar of the DAO
|
|
45
|
+
* @param _identity The identity contract
|
|
46
|
+
* @param _gasLimit The gas limit
|
|
47
|
+
*/
|
|
48
|
+
constructor(INameService _ns) {
|
|
49
|
+
setDAO(_ns);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function depositAsset(
|
|
53
|
+
address paymentId,
|
|
54
|
+
address asset,
|
|
55
|
+
uint value
|
|
56
|
+
) external payable {
|
|
57
|
+
require(!payments[paymentId].hasPayment, "paymentId already in use");
|
|
58
|
+
if (asset != address(0)) {
|
|
59
|
+
require(
|
|
60
|
+
ERC20(asset).transferFrom(msg.sender, address(this), value),
|
|
61
|
+
"asset deposit failed"
|
|
62
|
+
);
|
|
63
|
+
} else {
|
|
64
|
+
require(msg.value > 0, "native deposit failed");
|
|
65
|
+
value = msg.value;
|
|
66
|
+
}
|
|
67
|
+
payments[paymentId] = Payment(true, value, msg.sender, asset);
|
|
68
|
+
|
|
69
|
+
emit PaymentDeposit(msg.sender, paymentId, value, asset);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* @dev ERC677 on token transfer function. When transferAndCall is called on this contract,
|
|
73
|
+
* this function is called, depositing the payment amount under the hash of the given bytes.
|
|
74
|
+
* Reverts if hash is already in use. Can only be called by token contract.
|
|
75
|
+
* @param sender the address of the sender
|
|
76
|
+
* @param value the amount to deposit
|
|
77
|
+
* @param data The given paymentId which should be a fresh address of a wallet
|
|
78
|
+
*/
|
|
79
|
+
function onTokenTransfer(
|
|
80
|
+
address sender,
|
|
81
|
+
uint256 value,
|
|
82
|
+
bytes calldata data
|
|
83
|
+
) external returns (bool) {
|
|
84
|
+
address paymentId = abi.decode(data, (address));
|
|
85
|
+
|
|
86
|
+
require(!payments[paymentId].hasPayment, "paymentId already in use");
|
|
87
|
+
require(msg.sender == address(nativeToken()), "Only callable by this");
|
|
88
|
+
|
|
89
|
+
payments[paymentId] = Payment(true, value, sender, msg.sender);
|
|
90
|
+
|
|
91
|
+
emit PaymentDeposit(sender, paymentId, value, msg.sender);
|
|
92
|
+
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* @dev Withdrawal function.
|
|
97
|
+
* allows the sender that proves ownership of paymentId to withdraw
|
|
98
|
+
* @param paymentId the address of the public key that the
|
|
99
|
+
* rightful receiver of the payment knows the private key to
|
|
100
|
+
* @param signature the signature of a the message containing the msg.sender address signed
|
|
101
|
+
* with the private key.
|
|
102
|
+
*/
|
|
103
|
+
function withdraw(address paymentId, bytes memory signature) public {
|
|
104
|
+
address signer = signerOfAddress(msg.sender, signature);
|
|
105
|
+
require(signer == paymentId, "Signature is not correct");
|
|
106
|
+
|
|
107
|
+
uint256 value = payments[paymentId].paymentAmount;
|
|
108
|
+
address sender = payments[paymentId].paymentSender;
|
|
109
|
+
address asset = payments[paymentId].asset;
|
|
110
|
+
_withdraw(paymentId, value, asset);
|
|
111
|
+
emit PaymentWithdraw(sender, msg.sender, paymentId, value, asset);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* @dev Cancel function
|
|
115
|
+
* allows only creator of payment to cancel
|
|
116
|
+
* @param paymentId The paymentId of the payment to cancelæ
|
|
117
|
+
*/
|
|
118
|
+
function cancel(address paymentId) public {
|
|
119
|
+
require(
|
|
120
|
+
payments[paymentId].paymentSender == msg.sender,
|
|
121
|
+
"Can only be called by creator"
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
uint256 value = payments[paymentId].paymentAmount;
|
|
125
|
+
address asset = payments[paymentId].asset;
|
|
126
|
+
|
|
127
|
+
_withdraw(paymentId, value, asset);
|
|
128
|
+
emit PaymentCancel(msg.sender, paymentId, value, asset);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* @dev Internal withdraw function
|
|
132
|
+
* @param paymentId the paymentId of the payment
|
|
133
|
+
* @param value the amopunt in the payment
|
|
134
|
+
*/
|
|
135
|
+
function _withdraw(address paymentId, uint256 value, address asset) internal {
|
|
136
|
+
require(payments[paymentId].hasPayment, "paymentId not in use");
|
|
137
|
+
|
|
138
|
+
payments[paymentId].hasPayment = false;
|
|
139
|
+
|
|
140
|
+
if (asset == address(0)) {
|
|
141
|
+
(bool success, ) = payable(msg.sender).call{ value: value }("");
|
|
142
|
+
require(success, "withdraw native failed");
|
|
143
|
+
} else {
|
|
144
|
+
require(
|
|
145
|
+
ERC20(asset).transfer(msg.sender, value),
|
|
146
|
+
"withdraw transfer failed"
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* @dev function to check if a payment hash is in use
|
|
152
|
+
* @param paymentId the given paymentId
|
|
153
|
+
*/
|
|
154
|
+
function hasPayment(address paymentId) public view returns (bool) {
|
|
155
|
+
return payments[paymentId].hasPayment;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* @dev gives the signer address of the signature and the message
|
|
159
|
+
* @param message the plain-text message that is signed by the signature
|
|
160
|
+
* @param signature the signature of the plain-text message
|
|
161
|
+
*/
|
|
162
|
+
function signerOfAddress(
|
|
163
|
+
address message,
|
|
164
|
+
bytes memory signature
|
|
165
|
+
) internal pure returns (address) {
|
|
166
|
+
bytes32 signedMessage = ECDSA.toEthSignedMessageHash(
|
|
167
|
+
keccak256(abi.encodePacked(message))
|
|
168
|
+
);
|
|
169
|
+
address signer = ECDSA.recover(signedMessage, signature);
|
|
170
|
+
return signer;
|
|
171
|
+
}
|
|
172
|
+
}
|
package/hardhat.config.ts
CHANGED
|
@@ -35,6 +35,13 @@ const ethplorer_key = process.env.ETHPLORER_KEY;
|
|
|
35
35
|
|
|
36
36
|
const MAINNET_URL = "https://mainnet.infura.io/v3/" + infura_api;
|
|
37
37
|
|
|
38
|
+
const goerli = {
|
|
39
|
+
accounts: { mnemonic },
|
|
40
|
+
url: "https://rpc.ankr.com/eth_goerli",
|
|
41
|
+
gas: 3000000,
|
|
42
|
+
chainId: 5
|
|
43
|
+
};
|
|
44
|
+
|
|
38
45
|
// console.log({ mnemonic: sha3(mnemonic) });
|
|
39
46
|
const hhconfig: HardhatUserConfig = {
|
|
40
47
|
solidity: {
|
|
@@ -216,7 +223,10 @@ const hhconfig: HardhatUserConfig = {
|
|
|
216
223
|
gas: 3000000,
|
|
217
224
|
gasPrice: 500000000,
|
|
218
225
|
chainId: 100
|
|
219
|
-
}
|
|
226
|
+
},
|
|
227
|
+
goerli,
|
|
228
|
+
"development-goerli": goerli,
|
|
229
|
+
"staging-goerli": goerli
|
|
220
230
|
},
|
|
221
231
|
mocha: {
|
|
222
232
|
timeout: 6000000
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddollar/goodprotocol",
|
|
3
|
-
"version": "2.0.5-beta.
|
|
3
|
+
"version": "2.0.5-beta.10",
|
|
4
4
|
"description": "GoodDollar Protocol",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepack": "npm run minimize",
|
|
7
7
|
"build": "scripts/build.sh deploy",
|
|
8
|
-
"coverage:report": "
|
|
9
|
-
"coverage": "
|
|
8
|
+
"coverage:report": "COVERALLS_REPO_TOKEN='qiXNelh1HXMAsoPah9yRD2yG2WlqrDfLh' cat ../coverage/lcov.info coverage/lcov.info | coveralls",
|
|
9
|
+
"coverage": "CODE_COVERAGE=true hardhat --max-memory 6096 coverage",
|
|
10
10
|
"minimize": "./scripts/minimize.sh 'artifacts/contracts'",
|
|
11
11
|
"test": "hardhat test",
|
|
12
12
|
"test:parallel": "mocha --require hardhat/register --extension ts --recursive --parallel --exit",
|
|
@@ -60,9 +60,10 @@
|
|
|
60
60
|
"@jsier/retrier": "^1.2.4",
|
|
61
61
|
"@openzeppelin/contracts": "^4.8.0",
|
|
62
62
|
"@openzeppelin/contracts-upgradeable": "^4.8.0",
|
|
63
|
+
"@openzeppelin/upgrades-core": "1.18.0",
|
|
63
64
|
"@superfluid-finance/ethereum-contracts": "^1.4.3",
|
|
64
65
|
"@superfluid-finance/sdk-core": "^0.5.8",
|
|
65
|
-
"@typechain/hardhat": "^6.1.
|
|
66
|
+
"@typechain/hardhat": "^6.1.5",
|
|
66
67
|
"async-promise-pool": "^1.0.4",
|
|
67
68
|
"openzeppelin-solidity": "^4.3.2",
|
|
68
69
|
"patch-package": "latest",
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
"@gnosis.pm/safe-core-sdk-types": "^1.7.0",
|
|
80
81
|
"@gnosis.pm/safe-ethers-lib": "^1.7.0",
|
|
81
82
|
"@gnosis.pm/safe-service-client": "^1.4.0",
|
|
82
|
-
"@nomicfoundation/hardhat-network-helpers": "^1.0.
|
|
83
|
+
"@nomicfoundation/hardhat-network-helpers": "^1.0.8",
|
|
83
84
|
"@nomiclabs/hardhat-ethers": "^2.2.1",
|
|
84
85
|
"@nomiclabs/hardhat-etherscan": "^3.1.0",
|
|
85
86
|
"@nomiclabs/hardhat-waffle": "^2.0.3",
|
|
@@ -103,7 +104,7 @@
|
|
|
103
104
|
"fs-extra": "9.0.0",
|
|
104
105
|
"graphql": "^15.5.0",
|
|
105
106
|
"graphql-request": "^3.4.0",
|
|
106
|
-
"hardhat": "^2.
|
|
107
|
+
"hardhat": "^2.13.0",
|
|
107
108
|
"hardhat-contract-sizer": "^2.6.1",
|
|
108
109
|
"hardhat-gas-reporter": "^1.0.8",
|
|
109
110
|
"hardhat-storage-layout": "^0.1.7",
|
|
@@ -116,12 +117,13 @@
|
|
|
116
117
|
"prompt": "^1.3.0",
|
|
117
118
|
"regenerator-runtime": "^0.13.9",
|
|
118
119
|
"solhint": "*",
|
|
119
|
-
"solidity-coverage": "^0.
|
|
120
|
-
"truffle": "^5.3
|
|
120
|
+
"solidity-coverage": "^0.8.2",
|
|
121
|
+
"truffle": "^5.9.3",
|
|
121
122
|
"truffle-hdwallet-provider": "*",
|
|
122
123
|
"ts-generator": "^0.1.1",
|
|
123
124
|
"ts-node": "^10.8.0",
|
|
124
125
|
"typechain": "^6.0.2",
|
|
125
126
|
"typescript": "*"
|
|
126
|
-
}
|
|
127
|
+
},
|
|
128
|
+
"packageManager": "yarn@3.6.0"
|
|
127
129
|
}
|
|
@@ -207,6 +207,12 @@
|
|
|
207
207
|
},
|
|
208
208
|
"uniswapRouter": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
|
|
209
209
|
},
|
|
210
|
+
"development-goerli": {
|
|
211
|
+
"superfluidHost": "0x22ff293e14F1EC3A09B137e9e06084AFd63adDF9"
|
|
212
|
+
},
|
|
213
|
+
"staging-goerli": {
|
|
214
|
+
"superfluidHost": "0x22ff293e14F1EC3A09B137e9e06084AFd63adDF9"
|
|
215
|
+
},
|
|
210
216
|
"production": {
|
|
211
217
|
"governance": {
|
|
212
218
|
"gdaoAirdrop": "0x2feece0e9bc03b54e63e6eb7abb81a128f6bc7ce9a3bafd5ca2bea0c40e3634b",
|
package/releases/deployment.json
CHANGED
|
@@ -159,6 +159,7 @@
|
|
|
159
159
|
"FuseFaucet": "0x09Ad3430D146aa662eA8c20cBEBceBC0bbB3FB0a",
|
|
160
160
|
"Invites": "0x187fc9fB37DF0fbf75149913a97B17c968Fc90d0",
|
|
161
161
|
"OneTimePayments": "0x184C1F83b3eB75a2dac483D4a6b9FBD59Df961f8",
|
|
162
|
+
"OneTimePaymentsV2": "0x140A43d46F5445cdfC38E8C6f40F0a4541Fe933f",
|
|
162
163
|
"AdminWallet": "0xC1526892198796d30D33355cfF9Af10EED5B86A0",
|
|
163
164
|
"AdminWalletOld": "0x14204288286823042263156146334B1a4d61227c",
|
|
164
165
|
"network": "fuse",
|
|
@@ -267,6 +268,7 @@
|
|
|
267
268
|
"AdminWalletOld": "0x2961a6C2Fe39F0FFC4f4b1D9E037CD95f4e9C993",
|
|
268
269
|
"UpgradeScheme": "0xfC9F6F5E3ff7BAAB3fEf82e66f56917D625ba38B",
|
|
269
270
|
"OneTimePayments": "0x7912636D68E5d92708862b38698f764BF1EC297C",
|
|
271
|
+
"OneTimePaymentsV2": "0xEa6E73f5Ef1EC677FE2551128a22cDf27667a5Cd",
|
|
270
272
|
"network": "staging",
|
|
271
273
|
"networkId": 122,
|
|
272
274
|
"ProxyFactory": "0x240d844AdA767bE0AB08F9BcCcB6D8a04aE370EC",
|
|
@@ -437,7 +439,8 @@
|
|
|
437
439
|
"GuardiansSafe": "0x5878123fe880881f1Ecc92D5fd31e5D3F5Fba2e9",
|
|
438
440
|
"IdentityOld": "0xFa8d865A962ca8456dF331D78806152d3aC5B84F",
|
|
439
441
|
"MultichainRouter": "0x735aBE48e8782948a37C7765ECb76b98CdE97B0F",
|
|
440
|
-
"GoodDollarMintBurnWrapper": "0x031b2B7C7854dd8EE9C4A644D7e54aD17F56e3cB"
|
|
442
|
+
"GoodDollarMintBurnWrapper": "0x031b2B7C7854dd8EE9C4A644D7e54aD17F56e3cB",
|
|
443
|
+
"CommunitySafe": "0x5Eb5f5fE13d1D5e6440DbD5913412299Bc5B5564"
|
|
441
444
|
},
|
|
442
445
|
"pre-production-celo": {
|
|
443
446
|
"ProxyFactory": "0x99C22e78A579e2176311c736C4c9F0b0D5A47806",
|
|
@@ -475,7 +478,8 @@
|
|
|
475
478
|
"Faucet": "0x4F93Fa058b03953C851eFaA2e4FC5C34afDFAb84",
|
|
476
479
|
"Invites": "0x36829D1Cda92FFF5782d5d48991620664FC857d3",
|
|
477
480
|
"UBIScheme": "0x43d72Ff17701B2DA814620735C39C620Ce0ea4A1",
|
|
478
|
-
"OneTimePayments": "0xB27D247f5C2a61D2Cb6b6E67FEE51d839447e97d"
|
|
481
|
+
"OneTimePayments": "0xB27D247f5C2a61D2Cb6b6E67FEE51d839447e97d",
|
|
482
|
+
"SwapHelper": "0xE45CaB86609a16dFaDec112FDd61E4EA80EdaA8D"
|
|
479
483
|
},
|
|
480
484
|
"gnosis": {
|
|
481
485
|
"GuardiansSafe": "0x84c10b45fe51bfb4f86c19a47fdbc187d4572fb8"
|
|
@@ -501,7 +505,8 @@
|
|
|
501
505
|
"ClaimersDistribution": "0x6e3c0ad79FA7ccDFa27bE14C2630511415A2F635",
|
|
502
506
|
"CompoundVotingMachine": "0xC2C303131939370ed75c95686F691f290b56Be66",
|
|
503
507
|
"GuardiansSafe": "0x84C10B45fE51bfB4f86c19A47Fdbc187d4572Fb8",
|
|
504
|
-
"OneTimePayments": "0xB23e54fd8c2f35F9d38884Fc1611F5e9004f10ea"
|
|
508
|
+
"OneTimePayments": "0xB23e54fd8c2f35F9d38884Fc1611F5e9004f10ea",
|
|
509
|
+
"OneTimePaymentsV2": "0x2cb1c7d50371e277d7a36B171c0ACe9B157518EE"
|
|
505
510
|
},
|
|
506
511
|
"staging-celo": {
|
|
507
512
|
"network": "staging-celo",
|
|
@@ -524,6 +529,19 @@
|
|
|
524
529
|
"ClaimersDistribution": "0x671123F1c7a5B5445467Ff765a5E2Bc86878B245",
|
|
525
530
|
"CompoundVotingMachine": "0xCd25fB84AB22582F1034bcd80c399a3126f2E775",
|
|
526
531
|
"GuardiansSafe": "0x84C10B45fE51bfB4f86c19A47Fdbc187d4572Fb8",
|
|
527
|
-
"OneTimePayments": "0x514820Af2DaE5F537dE16E576471528176318113"
|
|
532
|
+
"OneTimePayments": "0x514820Af2DaE5F537dE16E576471528176318113",
|
|
533
|
+
"OneTimePaymentsV2": "0x963E7B4c970626Bb103c61fA16b002AFf6E6c2C7"
|
|
534
|
+
},
|
|
535
|
+
"development-goerli": {
|
|
536
|
+
"ProxyFactory": "0x65D8eACBCd9618b8780C4b444081915a5D54D611",
|
|
537
|
+
"GoodDollar": "0x70044867217EC9C46ecDe49C1f7fCA3b5Ed2f5C4",
|
|
538
|
+
"Avatar": "0xE0e3BFb1A1850bdFe36ED1563CC2abB6A8B6De78",
|
|
539
|
+
"Controller": "0x6717A1948328C8eCCb5C933Fae90e0631C2486fE",
|
|
540
|
+
"Identity": "0x53A537b6917fAFC6bFE1Ae0d54874A225Ce25bA1",
|
|
541
|
+
"NameService": "0xbd8297847F9De15409Dc0441560b2114c5e7b662",
|
|
542
|
+
"GReputation": "0x0abF3D20fCb33FC03bdF25b042E77edfAeDBBDD3",
|
|
543
|
+
"FeeFormula": "0x5fAA779cF74a1Ba51909DEeaA0e8900474DA77Cf",
|
|
544
|
+
"DAOCreator": "0xc66c970a6d99da587a7d7fa7d5383b401c3e87f4",
|
|
545
|
+
"OneTimePaymentsV2": "0x4E8112430974b4CE87283221a11BDC52097e7e2e"
|
|
528
546
|
}
|
|
529
547
|
}
|
|
@@ -3,14 +3,14 @@ import { ethers as Ethers } from "hardhat";
|
|
|
3
3
|
import fetch from "node-fetch";
|
|
4
4
|
|
|
5
5
|
const ONE_DAY = 24 * 60 * 60;
|
|
6
|
+
const ONE_HOUR = 60 * 60;
|
|
6
7
|
|
|
7
8
|
const main = async () => {
|
|
8
9
|
const signer = (await Ethers.getSigners())[0];
|
|
9
10
|
console.log("signer:", signer.address);
|
|
10
|
-
const ubiScheme = new Ethers.Contract(
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
).connect(signer);
|
|
11
|
+
const ubiScheme = new Ethers.Contract("0xD7aC544F8A570C4d8764c3AAbCF6870CBD960D0D", [
|
|
12
|
+
"function fishMulti(address[] tofish)"
|
|
13
|
+
]).connect(signer);
|
|
14
14
|
const twoWeeksAgo = parseInt((Date.now() / 1000).toFixed(0)); //
|
|
15
15
|
//parseInt((Date.now() / 1000).toFixed(0)) - 24 * 60 * 60 * 14;
|
|
16
16
|
|
|
@@ -28,21 +28,14 @@ const main = async () => {
|
|
|
28
28
|
}
|
|
29
29
|
`;
|
|
30
30
|
|
|
31
|
-
console.log(
|
|
32
|
-
"fetching inactive users since:",
|
|
33
|
-
{ curDay, day },
|
|
34
|
-
JSON.stringify({ query })
|
|
35
|
-
);
|
|
31
|
+
console.log("fetching inactive users since:", { curDay, day }, JSON.stringify({ query }));
|
|
36
32
|
const {
|
|
37
33
|
data: { walletStats }
|
|
38
|
-
} = await fetch(
|
|
39
|
-
"
|
|
40
|
-
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
headers: { "Content-Type": "application/json" }
|
|
44
|
-
}
|
|
45
|
-
).then(_ => _.json());
|
|
34
|
+
} = await fetch("https://api.thegraph.com/subgraphs/name/gooddollar/gooddollarfuse", {
|
|
35
|
+
method: "post",
|
|
36
|
+
body: JSON.stringify({ query }),
|
|
37
|
+
headers: { "Content-Type": "application/json" }
|
|
38
|
+
}).then(_ => _.json());
|
|
46
39
|
|
|
47
40
|
console.log("got inactive wallets:", walletStats.length);
|
|
48
41
|
if (walletStats) {
|
|
@@ -62,4 +55,49 @@ const main = async () => {
|
|
|
62
55
|
console.log("active claimers:", unique.length);
|
|
63
56
|
};
|
|
64
57
|
|
|
65
|
-
|
|
58
|
+
const countActive = async () => {
|
|
59
|
+
const twoWeeksAgo = parseInt((Date.now() / 1000).toFixed(0)); //
|
|
60
|
+
|
|
61
|
+
const hoursAgo: number[] = range(0, 24 * 14, 1);
|
|
62
|
+
let curDay = twoWeeksAgo;
|
|
63
|
+
const allActive = [];
|
|
64
|
+
for (let hour of hoursAgo) {
|
|
65
|
+
const query = `
|
|
66
|
+
{
|
|
67
|
+
walletStats(first:1000, where: { lastClaimed_lte: ${curDay},lastClaimed_gt: ${
|
|
68
|
+
curDay - ONE_HOUR
|
|
69
|
+
} isActiveUser: true }) {
|
|
70
|
+
id
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
74
|
+
|
|
75
|
+
console.log("fetching active users since:", { curDay, hour }, JSON.stringify({ query }));
|
|
76
|
+
const {
|
|
77
|
+
data: { walletStats }
|
|
78
|
+
} = await fetch("https://api.thegraph.com/subgraphs/name/gooddollar/gooddollarfuse", {
|
|
79
|
+
method: "post",
|
|
80
|
+
body: JSON.stringify({ query }),
|
|
81
|
+
headers: { "Content-Type": "application/json" }
|
|
82
|
+
}).then(_ => _.json());
|
|
83
|
+
|
|
84
|
+
console.log("got active wallets:", walletStats.length);
|
|
85
|
+
if (walletStats) {
|
|
86
|
+
const accounts = walletStats.map(_ => _.id);
|
|
87
|
+
allActive.push(...accounts);
|
|
88
|
+
}
|
|
89
|
+
// for (let tofish of chunk(accounts, 50)) {
|
|
90
|
+
// const tx = await ubiScheme.fishMulti(tofish, { gasLimit: 2000000 });
|
|
91
|
+
// console.log("fishing tx:", tx, tofish);
|
|
92
|
+
// const res = await tx.wait();
|
|
93
|
+
// console.log("fishing tx result:", res);
|
|
94
|
+
// }
|
|
95
|
+
|
|
96
|
+
curDay = curDay - ONE_HOUR;
|
|
97
|
+
}
|
|
98
|
+
const unique = uniq(allActive);
|
|
99
|
+
console.log("active claimers:", unique.length);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
//main();
|
|
103
|
+
countActive();
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { range, chunk, uniq } from "lodash";
|
|
2
|
+
import { ethers } from "hardhat";
|
|
3
|
+
import { Contract, Provider, setMulticallAddress } from "ethers-multicall";
|
|
4
|
+
import fs from "fs";
|
|
5
|
+
import { Retrier } from "@jsier/retrier";
|
|
6
|
+
|
|
7
|
+
setMulticallAddress(122, "0x3CE6158b7278Bf6792e014FA7B4f3c6c46fe9410");
|
|
8
|
+
setMulticallAddress(42220, "0x75F59534dd892c1f8a7B172D639FA854D529ada3");
|
|
9
|
+
const celoProvider = new ethers.providers.JsonRpcBatchProvider("https://forno.celo.org");
|
|
10
|
+
const ethcallProvider = new Provider(celoProvider, 42220);
|
|
11
|
+
const ethcallFuseProvider = new Provider(new ethers.providers.JsonRpcProvider("https://rpc.fuse.io"), 122);
|
|
12
|
+
|
|
13
|
+
const ONE_DAY = 24 * 60 * 60;
|
|
14
|
+
/**
|
|
15
|
+
* find accounts that where whitelisted on celo with diff authentication date than on fuse
|
|
16
|
+
*/
|
|
17
|
+
const main = async () => {
|
|
18
|
+
const identity = await ethers.getContractAt("IdentityV2", "0xC361A6E67822a0EDc17D899227dd9FC50BD62F42");
|
|
19
|
+
const abi = identity.interface.format(ethers.utils.FormatTypes.full);
|
|
20
|
+
const multiIdentity = new Contract(identity.address, abi as string[]);
|
|
21
|
+
const multiIdentityFuse = new Contract("0x2F9C28de9e6d44b71B91b8BA337A5D82e308E7BE", abi as string[]);
|
|
22
|
+
|
|
23
|
+
const celoStartBlock = 18003118;
|
|
24
|
+
const step = 10000;
|
|
25
|
+
const celoLastBlock = await ethers.provider.getBlockNumber();
|
|
26
|
+
const notFuse = [],
|
|
27
|
+
notCelo = [],
|
|
28
|
+
toFixCelo = [],
|
|
29
|
+
toFixFuse = [],
|
|
30
|
+
notBoth = [];
|
|
31
|
+
for (let i = 0; celoStartBlock + step * i < celoLastBlock; i++) {
|
|
32
|
+
try {
|
|
33
|
+
const options = { limit: 3, delay: 2000 };
|
|
34
|
+
const retrier = new Retrier(options);
|
|
35
|
+
|
|
36
|
+
const lastBlock = celoStartBlock + step * (i + 1) + 1;
|
|
37
|
+
await retrier.resolve(async attempt => {
|
|
38
|
+
const events = await identity
|
|
39
|
+
.connect(celoProvider)
|
|
40
|
+
.queryFilter(
|
|
41
|
+
identity.filters["WhitelistedAdded"](),
|
|
42
|
+
celoStartBlock + step * i,
|
|
43
|
+
Math.min(celoLastBlock, lastBlock)
|
|
44
|
+
);
|
|
45
|
+
console.log("found events:", events.length);
|
|
46
|
+
const whitelisted = events.map(_ => _.args?.account);
|
|
47
|
+
let found = 0;
|
|
48
|
+
const ps = chunk(whitelisted, 400).map(async addrChunk => {
|
|
49
|
+
const results = await ethcallProvider.all(addrChunk.map(addr => multiIdentity.lastAuthenticated(addr)));
|
|
50
|
+
const resultsFuse = await ethcallFuseProvider.all(
|
|
51
|
+
addrChunk.map(addr => multiIdentityFuse.lastAuthenticated(addr))
|
|
52
|
+
);
|
|
53
|
+
results.forEach((v, i) => {
|
|
54
|
+
const diff = v.toNumber() - resultsFuse[i].toNumber();
|
|
55
|
+
if (v.eq(0) || diff > 3600) {
|
|
56
|
+
found++;
|
|
57
|
+
// console.log("diff:", { i, addr: whitelisted[i], celo: v, fuse: resultsFuse[i] });
|
|
58
|
+
if (v.eq(0) && resultsFuse[i].eq(0)) {
|
|
59
|
+
// notBoth.push(addrChunk[i]);
|
|
60
|
+
} else if (v.eq(0)) {
|
|
61
|
+
notCelo.push(addrChunk[i]);
|
|
62
|
+
} else if (resultsFuse[i].eq(0)) {
|
|
63
|
+
notFuse.push([addrChunk[i], v.toNumber()]);
|
|
64
|
+
} else if (diff > 0) {
|
|
65
|
+
// console.log("mismatch:", addrChunk[i], { diff });
|
|
66
|
+
toFixCelo.push([addrChunk[i], resultsFuse[i].toNumber()]);
|
|
67
|
+
} else {
|
|
68
|
+
toFixFuse.push([addrChunk[i], v.toNumber()]);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
await Promise.all(ps);
|
|
74
|
+
console.log("done day:", { i, attempt, found });
|
|
75
|
+
});
|
|
76
|
+
} catch (e) {
|
|
77
|
+
console.log("failed day:", i, e.message.slice(0, 100));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
fs.writeFileSync("whitelistissue.json", JSON.stringify({ toFixCelo, toFixFuse, notCelo, notFuse }));
|
|
81
|
+
console.log({ toFixFuse: toFixFuse.length, toFixCelo: toFixCelo.length, notCelo, notFuse });
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const fix = async () => {
|
|
85
|
+
const { toFix, notFuse } = JSON.parse(fs.readFileSync("whitelistissue.json").toString());
|
|
86
|
+
};
|
|
87
|
+
main();
|