@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
|
@@ -12,19 +12,13 @@ import DAOCreatorABI from "@gooddollar/goodcontracts/build/contracts/DaoCreatorG
|
|
|
12
12
|
// import IdentityABI from "@gooddollar/goodcontracts/build/contracts/Identity.json";
|
|
13
13
|
import FeeFormulaABI from "@gooddollar/goodcontracts/build/contracts/FeeFormula.json";
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
deployDeterministic,
|
|
17
|
-
deploySuperGoodDollar,
|
|
18
|
-
verifyProductionSigner
|
|
19
|
-
} from "./helpers";
|
|
15
|
+
import { deployDeterministic, deploySuperGoodDollar, verifyProductionSigner } from "./helpers";
|
|
20
16
|
import releaser from "../releaser";
|
|
21
17
|
import ProtocolSettings from "../../releases/deploy-settings.json";
|
|
22
18
|
import dao from "../../releases/deployment.json";
|
|
23
19
|
import { TransactionResponse } from "@ethersproject/providers";
|
|
24
20
|
|
|
25
|
-
const printDeploy = async (
|
|
26
|
-
c: Contract | TransactionResponse
|
|
27
|
-
): Promise<Contract | TransactionResponse> => {
|
|
21
|
+
const printDeploy = async (c: Contract | TransactionResponse): Promise<Contract | TransactionResponse> => {
|
|
28
22
|
if (c instanceof Contract) {
|
|
29
23
|
await c.deployed();
|
|
30
24
|
console.log("deployed to: ", c.address);
|
|
@@ -37,11 +31,7 @@ const printDeploy = async (
|
|
|
37
31
|
};
|
|
38
32
|
|
|
39
33
|
export const createDAO = async () => {
|
|
40
|
-
let protocolSettings = defaultsDeep(
|
|
41
|
-
{},
|
|
42
|
-
ProtocolSettings[network.name],
|
|
43
|
-
ProtocolSettings["default"]
|
|
44
|
-
);
|
|
34
|
+
let protocolSettings = defaultsDeep({}, ProtocolSettings[network.name], ProtocolSettings["default"]);
|
|
45
35
|
|
|
46
36
|
let release: { [key: string]: any } = dao[network.name];
|
|
47
37
|
const isProduction = network.name.includes("production");
|
|
@@ -54,34 +44,17 @@ export const createDAO = async () => {
|
|
|
54
44
|
network,
|
|
55
45
|
daoOwner,
|
|
56
46
|
root: root.address,
|
|
57
|
-
balance: await ethers.provider
|
|
58
|
-
.getBalance(root.address)
|
|
59
|
-
.then(_ => _.toString()),
|
|
47
|
+
balance: await ethers.provider.getBalance(root.address).then(_ => _.toString()),
|
|
60
48
|
release
|
|
61
49
|
});
|
|
62
50
|
|
|
63
|
-
const DAOCreatorFactory = new ethers.ContractFactory(
|
|
64
|
-
DAOCreatorABI.abi,
|
|
65
|
-
DAOCreatorABI.bytecode,
|
|
66
|
-
root
|
|
67
|
-
);
|
|
51
|
+
const DAOCreatorFactory = new ethers.ContractFactory(DAOCreatorABI.abi, DAOCreatorABI.bytecode, root);
|
|
68
52
|
|
|
69
|
-
const FeeFormulaFactory = new ethers.ContractFactory(
|
|
70
|
-
FeeFormulaABI.abi,
|
|
71
|
-
FeeFormulaABI.bytecode,
|
|
72
|
-
root
|
|
73
|
-
);
|
|
53
|
+
const FeeFormulaFactory = new ethers.ContractFactory(FeeFormulaABI.abi, FeeFormulaABI.bytecode, root);
|
|
74
54
|
|
|
75
|
-
const proxyFactory = await ethers.getContractAt(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
);
|
|
79
|
-
const salt = ethers.BigNumber.from(
|
|
80
|
-
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("NameService"))
|
|
81
|
-
);
|
|
82
|
-
const nameserviceFutureAddress = await proxyFactory[
|
|
83
|
-
"getDeploymentAddress(uint256,address)"
|
|
84
|
-
](salt, root.address);
|
|
55
|
+
const proxyFactory = await ethers.getContractAt("ProxyFactory1967", release.ProxyFactory);
|
|
56
|
+
const salt = ethers.BigNumber.from(ethers.utils.keccak256(ethers.utils.toUtf8Bytes("NameService")));
|
|
57
|
+
const nameserviceFutureAddress = await proxyFactory["getDeploymentAddress(uint256,address)"](salt, root.address);
|
|
85
58
|
console.log("deploying identity", { nameserviceFutureAddress });
|
|
86
59
|
const Identity = (await deployDeterministic(
|
|
87
60
|
{
|
|
@@ -92,12 +65,11 @@ export const createDAO = async () => {
|
|
|
92
65
|
[root.address, ethers.constants.AddressZero]
|
|
93
66
|
).then(printDeploy)) as Contract;
|
|
94
67
|
|
|
95
|
-
const daoCreator = await DAOCreatorFactory.deploy();
|
|
68
|
+
const daoCreator = (await DAOCreatorFactory.deploy().then(printDeploy)) as Contract;
|
|
96
69
|
|
|
97
|
-
const FeeFormula = (await deployDeterministic(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
).then(printDeploy)) as Contract;
|
|
70
|
+
const FeeFormula = (await deployDeterministic({ name: "FeeFormula", factory: FeeFormulaFactory }, [0]).then(
|
|
71
|
+
printDeploy
|
|
72
|
+
)) as Contract;
|
|
101
73
|
|
|
102
74
|
let GoodDollar;
|
|
103
75
|
if (protocolSettings.superfluidHost) {
|
|
@@ -115,8 +87,7 @@ export const createDAO = async () => {
|
|
|
115
87
|
{
|
|
116
88
|
name: "GoodDollar",
|
|
117
89
|
isUpgradeable: true,
|
|
118
|
-
initializer:
|
|
119
|
-
"initialize(string, string, uint256, address, address, address,address)"
|
|
90
|
+
initializer: "initialize(string, string, uint256, address, address, address,address)"
|
|
120
91
|
},
|
|
121
92
|
[
|
|
122
93
|
isProduction ? "GoodDollar" : "GoodDollar Dev",
|
|
@@ -148,16 +119,11 @@ export const createDAO = async () => {
|
|
|
148
119
|
// await Identity.setAuthenticationPeriod(365).then(printDeploy);
|
|
149
120
|
|
|
150
121
|
console.log("creating dao");
|
|
151
|
-
await daoCreator
|
|
152
|
-
.forgeOrg(GoodDollar.address, GReputation.address, [], 0, [])
|
|
153
|
-
.then(printDeploy);
|
|
122
|
+
await daoCreator.forgeOrg(GoodDollar.address, GReputation.address, [], 0, []).then(printDeploy);
|
|
154
123
|
console.log("forgeOrg done ");
|
|
155
124
|
const Avatar = new ethers.Contract(
|
|
156
125
|
await daoCreator.avatar(),
|
|
157
|
-
[
|
|
158
|
-
"function owner() view returns (address)",
|
|
159
|
-
"function nativeToken() view returns (address)"
|
|
160
|
-
],
|
|
126
|
+
["function owner() view returns (address)", "function nativeToken() view returns (address)"],
|
|
161
127
|
root
|
|
162
128
|
);
|
|
163
129
|
|
|
@@ -181,16 +147,13 @@ export const createDAO = async () => {
|
|
|
181
147
|
)
|
|
182
148
|
.then(printDeploy);
|
|
183
149
|
|
|
184
|
-
const NameService = await deployDeterministic(
|
|
185
|
-
|
|
186
|
-
[
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
[controller, Avatar.address, Identity.address, gd, GReputation.address]
|
|
192
|
-
]
|
|
193
|
-
);
|
|
150
|
+
const NameService = await deployDeterministic({ name: "NameService", isUpgradeable: true }, [
|
|
151
|
+
controller,
|
|
152
|
+
["CONTROLLER", "AVATAR", "IDENTITY", "GOODDOLLAR", "REPUTATION"].map(_ =>
|
|
153
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes(_))
|
|
154
|
+
),
|
|
155
|
+
[controller, Avatar.address, Identity.address, gd, GReputation.address]
|
|
156
|
+
]);
|
|
194
157
|
|
|
195
158
|
console.log("set GRep nameservice..");
|
|
196
159
|
await (await GReputation.updateDAO(NameService.address)).wait();
|
|
@@ -206,54 +169,31 @@ export const createDAO = async () => {
|
|
|
206
169
|
await GoodDollar.renounceMinter().then(printDeploy);
|
|
207
170
|
}
|
|
208
171
|
|
|
209
|
-
const daoOwnerDaoPermissions = await Controller.getSchemePermissions(
|
|
210
|
-
daoOwner,
|
|
211
|
-
Avatar.address
|
|
212
|
-
);
|
|
172
|
+
const daoOwnerDaoPermissions = await Controller.getSchemePermissions(daoOwner, Avatar.address);
|
|
213
173
|
|
|
214
|
-
const deployerIsNotGDMinter =
|
|
215
|
-
(await GoodDollar.isMinter(root.address)) === false;
|
|
174
|
+
const deployerIsNotGDMinter = (await GoodDollar.isMinter(root.address)) === false;
|
|
216
175
|
|
|
217
176
|
const avatarIsGDMinter = await GoodDollar.isMinter(Avatar.address);
|
|
218
177
|
|
|
219
|
-
const deployerIsNotGDPauser =
|
|
220
|
-
(await GoodDollar.isPauser(root.address)) === false;
|
|
178
|
+
const deployerIsNotGDPauser = (await GoodDollar.isPauser(root.address)) === false;
|
|
221
179
|
|
|
222
|
-
const deployerIsNotRepMinter =
|
|
223
|
-
|
|
224
|
-
false;
|
|
225
|
-
const avatarIsRepMinter = await GReputation.hasRole(
|
|
226
|
-
GReputation.MINTER_ROLE(),
|
|
227
|
-
Avatar.address
|
|
228
|
-
);
|
|
180
|
+
const deployerIsNotRepMinter = (await GReputation.hasRole(GReputation.MINTER_ROLE(), root.address)) === false;
|
|
181
|
+
const avatarIsRepMinter = await GReputation.hasRole(GReputation.MINTER_ROLE(), Avatar.address);
|
|
229
182
|
|
|
230
|
-
const deployerIsIdentityOwner = await Identity.hasRole(
|
|
231
|
-
ethers.constants.HashZero,
|
|
232
|
-
root.address
|
|
233
|
-
);
|
|
183
|
+
const deployerIsIdentityOwner = await Identity.hasRole(ethers.constants.HashZero, root.address);
|
|
234
184
|
|
|
235
|
-
const avatarIsIdentityOwner = await Identity.hasRole(
|
|
236
|
-
ethers.constants.HashZero,
|
|
237
|
-
Avatar.address
|
|
238
|
-
);
|
|
185
|
+
const avatarIsIdentityOwner = await Identity.hasRole(ethers.constants.HashZero, Avatar.address);
|
|
239
186
|
|
|
240
187
|
//try to modify DAO -> should not succeed
|
|
241
188
|
await (await GReputation.updateDAO(ethers.constants.AddressZero)).wait();
|
|
242
189
|
|
|
243
|
-
const grepHasDAOSet =
|
|
244
|
-
(await GReputation.nameService()) === NameService.address;
|
|
190
|
+
const grepHasDAOSet = (await GReputation.nameService()) === NameService.address;
|
|
245
191
|
|
|
246
|
-
const factoryIsNotGoodOwner =
|
|
247
|
-
(await GReputation.hasRole(
|
|
248
|
-
ethers.constants.HashZero,
|
|
249
|
-
proxyFactory.address
|
|
250
|
-
)) === false;
|
|
192
|
+
const factoryIsNotGoodOwner = (await GReputation.hasRole(ethers.constants.HashZero, proxyFactory.address)) === false;
|
|
251
193
|
|
|
252
|
-
const factoryIsNotGDMinter =
|
|
253
|
-
(await GoodDollar.isMinter(proxyFactory.address)) === false;
|
|
194
|
+
const factoryIsNotGDMinter = (await GoodDollar.isMinter(proxyFactory.address)) === false;
|
|
254
195
|
|
|
255
|
-
const factoryIsNotGDPauser =
|
|
256
|
-
(await GoodDollar.isPauser(root.address)) === false;
|
|
196
|
+
const factoryIsNotGDPauser = (await GoodDollar.isPauser(root.address)) === false;
|
|
257
197
|
|
|
258
198
|
console.log({
|
|
259
199
|
daoOwnerDaoPermissions,
|
|
@@ -49,8 +49,8 @@ export const deployHelpers = async () => {
|
|
|
49
49
|
console.log("deploying onetime payments", { gasprice: protocolSettings.gasPrice });
|
|
50
50
|
const OTP = (await deployDeterministic(
|
|
51
51
|
{
|
|
52
|
-
name: "
|
|
53
|
-
salt: "
|
|
52
|
+
name: "OneTimePaymentsV2",
|
|
53
|
+
salt: "OneTimePaymentsV2",
|
|
54
54
|
isUpgradeable: false
|
|
55
55
|
},
|
|
56
56
|
[release.NameService]
|
|
@@ -59,12 +59,12 @@ export const deployHelpers = async () => {
|
|
|
59
59
|
// const OTP = await ethers.getContractAt("OneTimePayments", release.OneTimePayments);
|
|
60
60
|
|
|
61
61
|
const torelease = {
|
|
62
|
-
|
|
62
|
+
OneTimePaymentsV2: OTP.address
|
|
63
63
|
};
|
|
64
64
|
await releaser(torelease, network.name, "deployment", false);
|
|
65
65
|
|
|
66
66
|
const constructorArgs = ethers.utils.defaultAbiCoder.encode(["address"], [release.NameService]);
|
|
67
|
-
await verifyContract(OTP.address, "
|
|
67
|
+
await verifyContract(OTP.address, "OneTimePaymentsV2", network.name, undefined, constructorArgs);
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
export const main = async () => {
|
|
@@ -65,11 +65,11 @@ export const deploySuperGoodDollar = async (superfluidHost, tokenArgs) => {
|
|
|
65
65
|
[]
|
|
66
66
|
).then(printDeploy)) as Contract;
|
|
67
67
|
|
|
68
|
-
await GoodDollarProxy.initializeProxy(SuperGoodDollar.address);
|
|
68
|
+
await GoodDollarProxy.initializeProxy(SuperGoodDollar.address).then(printDeploy);
|
|
69
69
|
|
|
70
|
-
await SuperGoodDollar.attach(GoodDollarProxy.address)
|
|
71
|
-
"initialize(string,string,uint256,address,address,address,address)"
|
|
72
|
-
|
|
70
|
+
await SuperGoodDollar.attach(GoodDollarProxy.address)
|
|
71
|
+
["initialize(string,string,uint256,address,address,address,address)"](...tokenArgs)
|
|
72
|
+
.then(printDeploy);
|
|
73
73
|
|
|
74
74
|
const GoodDollar = await ethers.getContractAt("ISuperGoodDollar", GoodDollarProxy.address);
|
|
75
75
|
return GoodDollar;
|
|
@@ -143,6 +143,7 @@ export const executeViaGuardian = async (
|
|
|
143
143
|
let release: { [key: string]: any } = dao[network || networkName];
|
|
144
144
|
const ctrl = await (await ethers.getContractAt("Controller", release.Controller)).connect(guardian);
|
|
145
145
|
|
|
146
|
+
const results = [];
|
|
146
147
|
for (let i = 0; i < contracts.length; i++) {
|
|
147
148
|
const contract = contracts[i];
|
|
148
149
|
console.log("executing:", contracts[i], functionSigs[i], functionInputs[i]);
|
|
@@ -151,10 +152,15 @@ export const executeViaGuardian = async (
|
|
|
151
152
|
if (contract === ctrl.address) {
|
|
152
153
|
console.log("executing directly on controller:", sigHash, encoded);
|
|
153
154
|
|
|
154
|
-
|
|
155
|
+
const tx = await guardian
|
|
156
|
+
.sendTransaction({ to: contract, data: encoded })
|
|
157
|
+
.then(printDeploy)
|
|
158
|
+
.then(_ => _.wait());
|
|
159
|
+
results.push(tx);
|
|
155
160
|
} else {
|
|
156
161
|
const simulationResult = await ctrl.callStatic.genericCall(contract, encoded, release.Avatar, ethValues[i], {
|
|
157
|
-
from: await guardian.getAddress()
|
|
162
|
+
from: await guardian.getAddress(),
|
|
163
|
+
value: ethValues[i]
|
|
158
164
|
});
|
|
159
165
|
console.log("executing genericCall:", {
|
|
160
166
|
sigHash,
|
|
@@ -162,9 +168,15 @@ export const executeViaGuardian = async (
|
|
|
162
168
|
simulationResult
|
|
163
169
|
});
|
|
164
170
|
if (simulationResult[0] === false) throw new Error("simulation failed:" + contract);
|
|
165
|
-
|
|
171
|
+
const tx = await ctrl
|
|
172
|
+
.genericCall(contract, encoded, release.Avatar, ethValues[i])
|
|
173
|
+
.then(printDeploy)
|
|
174
|
+
.then(_ => _.wait());
|
|
175
|
+
// console.log("generic call events:", tx.events);
|
|
176
|
+
results.push(tx);
|
|
166
177
|
}
|
|
167
178
|
}
|
|
179
|
+
return results;
|
|
168
180
|
};
|
|
169
181
|
|
|
170
182
|
export const executeViaSafe = async (
|
|
@@ -200,7 +212,7 @@ export const executeViaSafe = async (
|
|
|
200
212
|
safeSigner = safeSignerOrNetwork as any;
|
|
201
213
|
}
|
|
202
214
|
const chainId = await safeSigner.getChainId();
|
|
203
|
-
console.log("safeSigner:", safeSigner.address, { chainId });
|
|
215
|
+
console.log("safeSigner:", safeSigner.address, { chainId, safeAddress });
|
|
204
216
|
let txServiceUrl;
|
|
205
217
|
switch (chainId) {
|
|
206
218
|
case 1:
|
|
@@ -240,7 +252,7 @@ export const executeViaSafe = async (
|
|
|
240
252
|
const encoded = ethers.utils.solidityPack(["bytes4", "bytes"], [sigHash, functionInputs[i]]);
|
|
241
253
|
if (contract === ctrl.address) {
|
|
242
254
|
const simulationResult =
|
|
243
|
-
isSimulation ===
|
|
255
|
+
isSimulation === true &&
|
|
244
256
|
(await ctrl.callStatic[functionSigs[i]](...functionInputs[i], {
|
|
245
257
|
from: safeAddress,
|
|
246
258
|
value: ethValues[i]
|
|
@@ -265,15 +277,16 @@ export const executeViaSafe = async (
|
|
|
265
277
|
});
|
|
266
278
|
|
|
267
279
|
const simulationResult =
|
|
268
|
-
isSimulation ===
|
|
280
|
+
isSimulation === true &&
|
|
269
281
|
(await ctrl.callStatic.genericCall(contract, encoded, release.Avatar, ethValues[i], {
|
|
270
|
-
from: safeAddress
|
|
282
|
+
from: safeAddress,
|
|
283
|
+
value: ethValues[i]
|
|
271
284
|
}));
|
|
272
285
|
console.log("executing genericCall simulation result:", {
|
|
273
286
|
sigHash,
|
|
274
287
|
simulationResult
|
|
275
288
|
});
|
|
276
|
-
if (isSimulation ===
|
|
289
|
+
if (isSimulation === true && simulationResult[0] === false) throw new Error("simulation failed:" + contract);
|
|
277
290
|
const genericEncode = ctrl.interface.encodeFunctionData("genericCall", [
|
|
278
291
|
contract,
|
|
279
292
|
encoded,
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* increase rate of UBI distribution on Celo
|
|
3
|
+
* also includes old foundation funds transfers from firstclaimpool and avatar towards initial topping of the UBI pool for the launch campaign
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ethers, network } from "hardhat";
|
|
7
|
+
import { defaultsDeep } from "lodash";
|
|
8
|
+
import prompt from "prompt";
|
|
9
|
+
import { reset } from "@nomicfoundation/hardhat-network-helpers";
|
|
10
|
+
|
|
11
|
+
import { executeViaGuardian, executeViaSafe, verifyProductionSigner } from "../multichain-deploy/helpers";
|
|
12
|
+
|
|
13
|
+
import ProtocolSettings from "../../releases/deploy-settings.json";
|
|
14
|
+
|
|
15
|
+
import dao from "../../releases/deployment.json";
|
|
16
|
+
|
|
17
|
+
const { name: networkName } = network;
|
|
18
|
+
const isForkSimulation = networkName === "localhost";
|
|
19
|
+
|
|
20
|
+
export const step1 = async () => {
|
|
21
|
+
const isProduction = networkName.includes("production");
|
|
22
|
+
let [root, ...signers] = await ethers.getSigners();
|
|
23
|
+
|
|
24
|
+
let networkEnv = networkName.split("-")[0];
|
|
25
|
+
if (isForkSimulation) networkEnv = "production";
|
|
26
|
+
const fuseNetwork = networkEnv;
|
|
27
|
+
|
|
28
|
+
if (networkEnv === "fuse") networkEnv = "development";
|
|
29
|
+
const celoNetwork = networkEnv + "-celo";
|
|
30
|
+
const mainnetNetwork = `${networkName === "localhost" ? "production" : networkName.split("-")[0]}-mainnet`; //simulate production on localhost requires running hardhat node in fork mode
|
|
31
|
+
|
|
32
|
+
let protocolSettings = defaultsDeep({}, ProtocolSettings[networkName], ProtocolSettings["default"]);
|
|
33
|
+
|
|
34
|
+
if (isForkSimulation)
|
|
35
|
+
// fund safe with eth so we can simulate TXs
|
|
36
|
+
await root.sendTransaction({ to: dao[mainnetNetwork].GuardiansSafe, value: ethers.constants.WeiPerEther });
|
|
37
|
+
|
|
38
|
+
console.log("got signers:", {
|
|
39
|
+
networkName,
|
|
40
|
+
root: root.address,
|
|
41
|
+
balance: await ethers.provider.getBalance(root.address).then(_ => _.toString()),
|
|
42
|
+
mainnetNetwork,
|
|
43
|
+
fuseNetwork,
|
|
44
|
+
celoNetwork
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const proposalContracts = [
|
|
48
|
+
dao[mainnetNetwork].GoodReserveCDai, // update the nonubi bps to 55%. 10% community fund + 45% celo ubi
|
|
49
|
+
dao[mainnetNetwork].DistributionHelper, //set community fund to 0.1818 so it gets 10% from 55%
|
|
50
|
+
dao[mainnetNetwork].DistributionHelper //set celo ubi to 0.8182 so it gets 45% from 55%
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
const proposalEthValues = proposalContracts.map(_ => 0);
|
|
54
|
+
|
|
55
|
+
const proposalFunctionSignatures = [
|
|
56
|
+
"setDistributionHelper(address,uint32)",
|
|
57
|
+
"addOrUpdateRecipient((uint32,uint32,address,uint8))",
|
|
58
|
+
"addOrUpdateRecipient((uint32,uint32,address,uint8))"
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
const proposalFunctionInputs = [
|
|
62
|
+
ethers.utils.defaultAbiCoder.encode(["address", "uint32"], [dao[mainnetNetwork].DistributionHelper, 5500]),
|
|
63
|
+
ethers.utils.defaultAbiCoder.encode(
|
|
64
|
+
["uint32", "uint32", "address", "uint8"],
|
|
65
|
+
[8182, 42220, dao[celoNetwork].UBIScheme, 1]
|
|
66
|
+
),
|
|
67
|
+
ethers.utils.defaultAbiCoder.encode(
|
|
68
|
+
["uint32", "uint32", "address", "uint8"],
|
|
69
|
+
[1818, 122, dao[fuseNetwork].CommunitySafe, 0] //community safe on fuse
|
|
70
|
+
)
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
if (isProduction) {
|
|
74
|
+
await executeViaSafe(
|
|
75
|
+
proposalContracts,
|
|
76
|
+
proposalEthValues,
|
|
77
|
+
proposalFunctionSignatures,
|
|
78
|
+
proposalFunctionInputs,
|
|
79
|
+
protocolSettings.guardiansSafe,
|
|
80
|
+
"mainnet"
|
|
81
|
+
);
|
|
82
|
+
} else {
|
|
83
|
+
await executeViaGuardian(
|
|
84
|
+
proposalContracts,
|
|
85
|
+
proposalEthValues,
|
|
86
|
+
proposalFunctionSignatures,
|
|
87
|
+
proposalFunctionInputs,
|
|
88
|
+
isForkSimulation ? await ethers.getImpersonatedSigner(dao[mainnetNetwork].GuardiansSafe) : root,
|
|
89
|
+
mainnetNetwork
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (isForkSimulation) {
|
|
94
|
+
const reserve = await ethers.getContractAt("GoodReserveCDai", dao[mainnetNetwork].GoodReserveCDai);
|
|
95
|
+
//verify balance of avatar is 0
|
|
96
|
+
const events = await reserve.queryFilter(reserve.filters.DistributionHelperSet(), -10);
|
|
97
|
+
console.log({ events });
|
|
98
|
+
console.assert(events[0].args?.bps === 5500, "wrong bps");
|
|
99
|
+
const helper = await ethers.getContractAt("DistributionHelper", dao[mainnetNetwork].DistributionHelper);
|
|
100
|
+
const helperEvents = await helper.queryFilter(helper.filters.RecipientUpdated(), -10);
|
|
101
|
+
console.log(
|
|
102
|
+
"helperEvents",
|
|
103
|
+
helperEvents.map(_ => _.args)
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
//verify multichain bridge did burn
|
|
107
|
+
console.assert(
|
|
108
|
+
helperEvents.find(
|
|
109
|
+
_ =>
|
|
110
|
+
_.args?.recipient[0] === 1818 &&
|
|
111
|
+
_.args?.recipient[2] == dao[fuseNetwork].CommunitySafe &&
|
|
112
|
+
_.args?.recipient[1] === 122 &&
|
|
113
|
+
_.args?.recipient[3] === 0
|
|
114
|
+
),
|
|
115
|
+
"wrong community pool bps"
|
|
116
|
+
);
|
|
117
|
+
console.assert(
|
|
118
|
+
helperEvents.find(
|
|
119
|
+
_ =>
|
|
120
|
+
_.args?.recipient[0] === 8182 &&
|
|
121
|
+
_.args?.recipient[2] == dao[celoNetwork].UBIScheme &&
|
|
122
|
+
_.args?.recipient[1] === 42220 &&
|
|
123
|
+
_.args?.recipient[3] === 1
|
|
124
|
+
),
|
|
125
|
+
"wrong celo ubi pool bps"
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export const step2 = async () => {
|
|
131
|
+
const isProduction = networkName.includes("production");
|
|
132
|
+
let [root, ...signers] = await ethers.getSigners();
|
|
133
|
+
|
|
134
|
+
let networkEnv = networkName.split("-")[0];
|
|
135
|
+
const isForkSimulation = networkName === "localhost";
|
|
136
|
+
if (isForkSimulation) networkEnv = "production";
|
|
137
|
+
const fuseNetwork = networkEnv;
|
|
138
|
+
|
|
139
|
+
if (networkEnv === "fuse") networkEnv = "development";
|
|
140
|
+
const celoNetwork = networkEnv + "-celo";
|
|
141
|
+
const mainnetNetwork = `${networkName === "localhost" ? "production" : networkName}-mainnet`; //simulate production on localhost requires running hardhat node in fork mode
|
|
142
|
+
|
|
143
|
+
let protocolSettings = defaultsDeep({}, ProtocolSettings[networkName], ProtocolSettings["default"]);
|
|
144
|
+
|
|
145
|
+
if (isForkSimulation)
|
|
146
|
+
// fund safe with eth so we can simulate TXs
|
|
147
|
+
await root.sendTransaction({ to: dao[fuseNetwork].GuardiansSafe, value: ethers.constants.WeiPerEther });
|
|
148
|
+
|
|
149
|
+
console.log("got signers:", {
|
|
150
|
+
networkName,
|
|
151
|
+
root: root.address,
|
|
152
|
+
balance: await ethers.provider.getBalance(root.address).then(_ => _.toString()),
|
|
153
|
+
mainnetNetwork,
|
|
154
|
+
fuseNetwork,
|
|
155
|
+
celoNetwork
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
const fuseProposalContracts = [
|
|
159
|
+
dao[fuseNetwork].FirstClaimPool, // end the pool to get locked funds
|
|
160
|
+
dao[fuseNetwork].GoodDollar, //approve multichain wrapper
|
|
161
|
+
dao[fuseNetwork].MultichainRouter //anyswapout
|
|
162
|
+
];
|
|
163
|
+
|
|
164
|
+
const fuseProposalEthValues = fuseProposalContracts.map(_ => 0);
|
|
165
|
+
|
|
166
|
+
const fuseProposalFunctionSignatures = [
|
|
167
|
+
"end()",
|
|
168
|
+
// "transferAndCall(address,uint256,bytes)"//transferAndcall not working in simulation. using aprrove+anyswapout
|
|
169
|
+
"approve(address,uint256)",
|
|
170
|
+
"anySwapOut(address,address,uint256,uint256)"
|
|
171
|
+
];
|
|
172
|
+
|
|
173
|
+
const gd = await ethers.getContractAt("GoodDollar", dao[fuseNetwork].GoodDollar);
|
|
174
|
+
const aBalance = await gd.balanceOf(dao[fuseNetwork].Avatar);
|
|
175
|
+
const bBalance = await gd.balanceOf(dao[fuseNetwork].FirstClaimPool);
|
|
176
|
+
|
|
177
|
+
console.log("balances to bridge:", aBalance.toString(), bBalance.toString());
|
|
178
|
+
const fuseProposalFunctionInputs = [
|
|
179
|
+
ethers.utils.defaultAbiCoder.encode([], []),
|
|
180
|
+
ethers.utils.defaultAbiCoder.encode(
|
|
181
|
+
["address", "uint256"],
|
|
182
|
+
[dao[fuseNetwork].GoodDollarMintBurnWrapper, aBalance.add(bBalance)]
|
|
183
|
+
),
|
|
184
|
+
ethers.utils.defaultAbiCoder.encode(
|
|
185
|
+
["address", "address", "uint256", "uint256"],
|
|
186
|
+
[dao[fuseNetwork].GoodDollarMintBurnWrapper, dao[celoNetwork].UBIScheme, aBalance.add(bBalance), 42220]
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
//transferAndCall isnt working in simualation for some reason
|
|
190
|
+
// ethers.utils.defaultAbiCoder.encode(
|
|
191
|
+
// ["address", "uint256", "bytes"],
|
|
192
|
+
// [
|
|
193
|
+
// dao[fuseNetwork].GoodDollarMintBurnWrapper,
|
|
194
|
+
// aBalance.add(bBalance),
|
|
195
|
+
// ethers.utils.defaultAbiCoder.encode(["address", "uint256"], [dao[celoNetwork].UBIScheme, 42220])
|
|
196
|
+
// ] //target ubipool on celo for multichain bridge
|
|
197
|
+
// )
|
|
198
|
+
];
|
|
199
|
+
|
|
200
|
+
const totalSupplyBefore = await gd.totalSupply();
|
|
201
|
+
if (isProduction) {
|
|
202
|
+
await executeViaSafe(
|
|
203
|
+
fuseProposalContracts,
|
|
204
|
+
fuseProposalEthValues,
|
|
205
|
+
fuseProposalFunctionSignatures,
|
|
206
|
+
fuseProposalFunctionInputs,
|
|
207
|
+
dao[fuseNetwork].GuardiansSafe,
|
|
208
|
+
"fuse"
|
|
209
|
+
);
|
|
210
|
+
} else {
|
|
211
|
+
await executeViaGuardian(
|
|
212
|
+
fuseProposalContracts,
|
|
213
|
+
fuseProposalEthValues,
|
|
214
|
+
fuseProposalFunctionSignatures,
|
|
215
|
+
fuseProposalFunctionInputs,
|
|
216
|
+
isForkSimulation ? await ethers.getImpersonatedSigner(dao[fuseNetwork].GuardiansSafe) : root,
|
|
217
|
+
fuseNetwork
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (isForkSimulation) {
|
|
222
|
+
//verify balance of avatar is 0
|
|
223
|
+
console.assert((await gd.balanceOf(dao[fuseNetwork].Avatar)).eq(0), await gd.balanceOf(dao[fuseNetwork].Avatar));
|
|
224
|
+
//verify multichain bridge did burn
|
|
225
|
+
console.assert((await gd.totalSupply()).lt(totalSupplyBefore), "bridge didnt burn G$s");
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
export const main = async () => {
|
|
230
|
+
prompt.start();
|
|
231
|
+
const { stepNumber } = await prompt.get(["stepNumber"]);
|
|
232
|
+
|
|
233
|
+
console.log("running step:", { stepNumber });
|
|
234
|
+
switch (stepNumber) {
|
|
235
|
+
case "1":
|
|
236
|
+
isForkSimulation && (await reset("https://cloudflare-eth.com"));
|
|
237
|
+
await step1();
|
|
238
|
+
break;
|
|
239
|
+
|
|
240
|
+
//to simulate run first
|
|
241
|
+
//npx hardhat node --fork https://rpc.fuse.io
|
|
242
|
+
//then run npx hardhat run scripts/proposals/gip-14_1.ts --network localhost
|
|
243
|
+
case "2":
|
|
244
|
+
isForkSimulation && (await reset("https://rpc.fuse.io"));
|
|
245
|
+
await step2();
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
// await upgrade().catch(console.log);
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
main();
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
## Mainnet on-chain proposal
|
|
2
|
+
|
|
3
|
+
- On mainnet we send 10% to community pool and 50% of the remaining 90% (ie 45%) to the Celo UBI Pool, so in total its 55% we distribute via the distribution helper.
|
|
4
|
+
- 10% of the 55% is 0.1818 or 1818 in bps
|
|
5
|
+
- 45% of the 55% is 0.8182 or 8182 in bps
|
|
6
|
+
|
|
7
|
+
| contract | method | arguments |
|
|
8
|
+
| -------------------------------------------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| Reserve: 0xa150a825d425B36329D8294eeF8bD0fE68f8F6E0 | setDistributionHelper(DistributionHelper \_helper, uin32 \_bps) | (DistributionHelper:"0xAcadA0C9795fdBb6921AE96c4D7Db2F8B8c52Fd0",5500) |
|
|
10
|
+
| DistributionHelper: 0xAcadA0C9795fdBb6921AE96c4D7Db2F8B8c52Fd0 | addOrUpdateRecipient(DistributionRecipient memory \_recipient) | {bps: 8182, chainId: 42220, addr: CeloUBIScheme:'0x43d72Ff17701B2DA814620735C39C620Ce0ea4A1', transferType: 1} |
|
|
11
|
+
| DistributionHelper: 0xAcadA0C9795fdBb6921AE96c4D7Db2F8B8c52Fd0 | addOrUpdateRecipient(DistributionRecipient memory \_recipient) | {bps: 1818, chainId: 122, addr: FuseCommunitySafe:'0x5Eb5f5fE13d1D5e6440DbD5913412299Bc5B5564', transferType: 0} |
|
|
12
|
+
|
|
13
|
+
## Fuse on-chain proposal
|
|
14
|
+
|
|
15
|
+
- On fuse we collect funds from FirstClaimPool and then transfer these funds + older funds in Avatar (also from older FirstClaimPool/Invite contracts funded by GoodLabs) to the UBI Pool on Celo via the multichain bridge
|
|
16
|
+
|
|
17
|
+
| contract | method | arguments |
|
|
18
|
+
| ------------------------------------------------------------ | ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| FirstClaimPool: 0x18BcdF79A724648bF34eb06701be81bD072A2384 | end() | |
|
|
20
|
+
| GoodDollar: 0x495d133B938596C9984d462F007B676bDc57eCEC | approve(address spender,uint256 amount) | (GoodDollarMintBurnWrapper:"0x031b2B7C7854dd8EE9C4A644D7e54aD17F56e3cB",128069283 + 463420500) |
|
|
21
|
+
| MultichainRouter: 0xAcadA0C9795fdBb6921AE96c4D7Db2F8B8c52Fd0 | function anySwapOut(address token,address to,uint256 amount,uint256 toChainID) | (GoodDollarMintBurnWrapper:"0x031b2B7C7854dd8EE9C4A644D7e54aD17F56e3cB",CeloUBIScheme:"0x43d72Ff17701B2DA814620735C39C620Ce0ea4A1",128069283 + 463420500,42220) |
|
|
22
|
+
|
|
23
|
+
## To Test/Simulate on a forked chain
|
|
24
|
+
|
|
25
|
+
- `npx hardhat node --fork https://rpc.fuse.io &`
|
|
26
|
+
- `npx hardhat run scripts/proposals/gip-14_1.ts --network localhost`
|
|
27
|
+
- Choose step:
|
|
28
|
+
1: run mainnet proposal
|
|
29
|
+
2: run fuse proposal
|