@gooddollar/goodprotocol 2.0.13 → 2.0.14-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/abis/DistributionBridgeMock.min.json +1 -1
- package/artifacts/abis/DistributionHelper.min.json +1 -1
- package/artifacts/abis/DistributionHelperTest.min.json +1 -1
- package/artifacts/abis/DistributionHelperTestHelper.min.json +1 -1
- package/artifacts/abis/GasPriceMockOracle.min.json +1 -1
- package/artifacts/abis/GoodCompoundStakingTest.min.json +1 -1
- package/artifacts/abis/GoodReserveCDai.min.json +1 -1
- package/artifacts/abis/IFeesFormula.min.json +1 -1
- package/artifacts/abis/ISuperGoodDollar.min.json +1 -1
- package/artifacts/abis/ISuperToken.min.json +1 -0
- package/artifacts/abis/MultichainFeeFormula.min.json +1 -0
- package/artifacts/abis/SuperGoodDollar.min.json +1 -1
- package/artifacts/abis/SuperToken.min.json +1 -1
- package/artifacts/abis/UBIScheme.min.json +1 -1
- package/artifacts/abis/UBISchemeV2.min.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/Avatar.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/Controller.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/IntVoteInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/ReputationInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/SchemeRegistrar.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/AggregatorV3Interface.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ERC20.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IAaveIncentivesController.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IAdminWallet.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IDonationStaking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IERC2917.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IGoodStaking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IHasRouter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IIdentity.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ILendingPool.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IMultichainRouter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/INameService.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IUBIScheme.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ProxyAdmin.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Reserve.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Uniswap.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/UniswapFactory.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/UniswapPair.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/cERC20.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.json +2 -2
- package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.json +2 -2
- package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.json +2 -2
- package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
- package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.json +2 -2
- package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
- package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.json +2 -2
- package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
- package/artifacts/contracts/governance/GReputation.sol/GReputation.json +2 -2
- package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.json +2 -2
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IStakingUpgrade.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/RewardsMinter.dbg.json +1 -1
- package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.json +2 -2
- package/artifacts/contracts/governance/MultiBaseGovernanceShareField.sol/MultiBaseGovernanceShareField.dbg.json +1 -1
- package/artifacts/contracts/governance/Reputation.sol/Reputation.dbg.json +1 -1
- package/artifacts/contracts/governance/Reputation.sol/Reputation.json +2 -2
- package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
- package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.json +2 -2
- package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
- package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.json +2 -2
- package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.json +2 -2
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.json +2 -2
- package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.json +2 -2
- package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.json +2 -2
- package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.json +2 -2
- package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.json +2 -2
- package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.json +2 -2
- package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.json +2 -2
- package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.json +2 -2
- package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.json +2 -2
- package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.json +122 -17
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.json +242 -17
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.json +256 -18
- package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.json +2 -2
- package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.json +2 -2
- package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.json +15 -2
- package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.json +6 -6
- package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.json +2 -2
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.json +2 -2
- package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.json +2 -2
- package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.json +2 -2
- package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.json +2 -2
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/IWrapper.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.json +2 -2
- package/artifacts/contracts/mocks/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.json +2 -2
- package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.json +2 -2
- package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.json +2 -2
- package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.json +2 -2
- package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.json +2 -2
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.json +2 -2
- package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.json +2 -2
- package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.json +2 -2
- package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.json +2 -2
- package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.json +2 -2
- package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.json +2 -2
- package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.json +2 -2
- package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.json +2 -2
- package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.json +2 -2
- package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.json +2 -2
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.json +242 -17
- 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 +45 -19
- package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.json +2 -2
- package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.json +2 -2
- package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.json +2 -2
- package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.json +2 -2
- package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.dbg.json +1 -1
- package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.dbg.json +1 -1
- package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.json +2 -2
- package/artifacts/contracts/staking/SimpleStaking.sol/SimpleStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/SimpleStakingV2.sol/SimpleStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.dbg.json +1 -1
- package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.json +2 -2
- package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.json +2 -2
- package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.json +2 -2
- package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.json +2 -2
- package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.json +2 -2
- package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.json +2 -2
- package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.json +2 -2
- package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.dbg.json +1 -1
- package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.json +2 -2
- package/artifacts/contracts/staking/utils/StakingRewardsFixedAPY.sol/StakingRewardsFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.dbg.json +1 -1
- package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.json +2 -2
- package/artifacts/contracts/token/ERC677.sol/ERC677.dbg.json +1 -1
- package/artifacts/contracts/token/ERC677.sol/ERC677Receiver.dbg.json +1 -1
- package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.json +2 -2
- package/artifacts/contracts/token/IFeesFormula.sol/IFeesFormula.dbg.json +4 -0
- package/artifacts/contracts/token/{FeesFormula.sol → IFeesFormula.sol}/IFeesFormula.json +1 -1
- package/artifacts/contracts/token/MultichainFeeFormula.sol/MultichainFeeFormula.dbg.json +4 -0
- package/artifacts/contracts/token/MultichainFeeFormula.sol/MultichainFeeFormula.json +58 -0
- 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/ISuperGoodDollar.sol/ISuperGoodDollar.json +159 -5
- package/artifacts/contracts/token/superfluid/ISuperToken.sol/ISuperToken.dbg.json +4 -0
- package/artifacts/contracts/token/superfluid/ISuperToken.sol/ISuperToken.json +1609 -0
- package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +233 -190
- package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.json +198 -193
- 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 +20 -2
- package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.json +20 -2
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.json +2 -2
- package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.json +2 -2
- package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.dbg.json +1 -1
- package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.json +2 -2
- package/artifacts/contracts/utils/BulkProof.sol/BulkProof.dbg.json +1 -1
- package/artifacts/contracts/utils/BulkProof.sol/BulkProof.json +2 -2
- package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.json +2 -2
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.json +2 -2
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.json +2 -2
- package/artifacts/contracts/utils/BuyGDClone.sol/ISwapRouter.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOContract.sol/DAOContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOContract.sol/DAOContract.json +2 -2
- package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.json +2 -2
- package/artifacts/contracts/utils/DSMath.sol/DSMath.dbg.json +1 -1
- package/artifacts/contracts/utils/DSMath.sol/DSMath.json +2 -2
- package/artifacts/contracts/utils/DataTypes.sol/DataTypes.dbg.json +1 -1
- package/artifacts/contracts/utils/DataTypes.sol/DataTypes.json +2 -2
- package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.dbg.json +1 -1
- package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.json +2 -2
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.json +2 -2
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/IRouter.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/PausableControl.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.json +2 -2
- package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.dbg.json +1 -1
- package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.json +2 -2
- package/artifacts/contracts/utils/MultiCall.sol/Multicall.dbg.json +1 -1
- package/artifacts/contracts/utils/MultiCall.sol/Multicall.json +2 -2
- package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.json +2 -2
- package/artifacts/contracts/utils/NameService.sol/NameService.dbg.json +1 -1
- package/artifacts/contracts/utils/NameService.sol/NameService.json +2 -2
- package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.json +2 -2
- package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/OldMarketMaker.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.json +2 -2
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.dbg.json +1 -1
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.json +2 -2
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.dbg.json +1 -1
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.json +2 -2
- package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.json +2 -2
- package/contracts/invite/InvitesFuseV2.sol +3 -2
- package/contracts/mocks/DistributionBridgeMock.sol +42 -15
- package/contracts/mocks/DistributionHelperTest.sol +6 -2
- package/contracts/mocks/FeesFormularMock.sol +14 -14
- package/contracts/mocks/GasPriceMockOracle.sol +7 -1
- package/contracts/reserve/DistributionHelper.sol +147 -23
- package/contracts/reserve/GoodReserveCDai.sol +39 -47
- package/contracts/staking/GoodFundManager.sol +18 -37
- package/contracts/token/GoodDollar.sol +11 -16
- package/contracts/token/MultichainFeeFormula.sol +34 -0
- package/contracts/token/superfluid/ConstantFlowNFTs.sol +3 -0
- package/contracts/token/superfluid/ISuperGoodDollar.sol +4 -5
- package/contracts/token/superfluid/ISuperToken.sol +464 -0
- package/contracts/token/superfluid/SuperGoodDollar.sol +408 -376
- package/contracts/token/superfluid/SuperToken.sol +144 -144
- package/contracts/ubi/UBIScheme.sol +9 -5
- package/contracts/ubi/UBISchemeV2.sol +6 -0
- package/contracts/utils/AdminWallet.sol +2 -1
- package/contracts/utils/AdminWalletFuse.sol +2 -1
- package/contracts/utils/BuyAndBridgeHelper.sol +13 -13
- package/contracts/utils/MultiCall.sol +8 -10
- package/dist/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.json +2 -2
- package/dist/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +233 -190
- package/dist/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.json +2 -2
- package/dist/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.json +2 -2
- package/hardhat.config.ts +46 -15
- package/package.json +7 -7
- package/releases/deploy-settings.json +3 -1
- package/releases/deployment.json +6 -2
- package/scripts/analytics/faucetStats.ts +19 -15
- package/scripts/fv.ts +305 -0
- package/scripts/multichain-deploy/1_basicdao-deploy.ts +18 -9
- package/scripts/multichain-deploy/helpers.ts +204 -64
- package/scripts/proposals/gip-15.ts +427 -0
- package/scripts/upgrades/multichain-formula-upgrade.ts +140 -0
- package/scripts/upgrades/restoreFunds.ts +91 -0
- package/scripts/upgrades/superfluid-nft-celo-gas-token.ts +159 -0
- package/scripts/utils.ts +15 -0
- package/test/helpers.ts +73 -10
- package/test/reserve/DistributionHelper.test.ts +183 -218
- package/test/reserve/GoodReserveCDai.distribution.test.ts +21 -144
- package/test/reserve/GoodReserveCDai.test.ts +98 -302
- package/test/staking/StakingRewards.test.ts +324 -936
- package/test/token/CeloGasToken.test.ts +108 -0
- package/test/token/SuperGoodDollar.test.ts +15 -6
- package/test/utils/AdminWallet.test.ts +97 -38
- package/test/utils/BuyAndBridgeHelper.test.ts +9 -33
- package/truffle-config.js +24 -6
- package/types/ConstantInflowNFT.ts +969 -0
- package/types/ConstantOutflowNFT.ts +1031 -0
- package/types/DistributionBridgeMock.ts +203 -70
- package/types/DistributionHelper.ts +325 -30
- package/types/DistributionHelperTest.ts +325 -30
- package/types/DistributionHelperTestHelper.ts +355 -35
- package/types/FlowNFTBase.ts +887 -0
- package/types/GasPriceMockOracle.ts +29 -0
- package/types/GoodReserveCDai.ts +79 -20
- package/types/IConstantFlowAgreementV1.ts +1391 -0
- package/types/IConstantInflowNFT.ts +772 -0
- package/types/IConstantOutflowNFT.ts +834 -0
- package/types/IERC721.ts +487 -0
- package/types/IERC721Metadata.ts +538 -0
- package/types/IFlowNFTBase.ts +711 -0
- package/types/IInstantDistributionAgreementV1.ts +1183 -0
- package/types/ILayerZeroFeeEstimator.ts +136 -0
- package/types/IMessagePassingBridge.ts +774 -0
- package/types/ISETH.ts +2668 -0
- package/types/ISETHCustom.ts +161 -0
- package/types/ISuperGoodDollar.ts +277 -25
- package/types/ISuperToken.ts +202 -346
- package/types/ISuperfluid.ts +7 -2
- package/types/ISuperfluidGovernance.ts +40 -5
- package/types/MultichainFeeFormula.ts +130 -0
- package/types/SuperGoodDollar.ts +383 -349
- package/types/SuperToken.ts +319 -344
- package/types/UBIScheme.ts +36 -0
- package/types/UBISchemeV2.ts +36 -0
- package/types/factories/AaveMock__factory.ts +1 -1
- package/types/factories/AaveStakingFactory__factory.ts +1 -1
- package/types/factories/AaveUSDMockOracle__factory.ts +1 -1
- package/types/factories/AdminWalletFuse__factory.ts +1 -1
- package/types/factories/AdminWallet__factory.ts +1 -1
- package/types/factories/BancorFormula__factory.ts +1 -1
- package/types/factories/BaseShareFieldV2__factory.ts +1 -1
- package/types/factories/BaseShareField__factory.ts +1 -1
- package/types/factories/BatUSDMockOracle__factory.ts +1 -1
- package/types/factories/BuyAndBridgeHelper__factory.ts +1 -1
- package/types/factories/BuyGDCloneFactory__factory.ts +1 -1
- package/types/factories/BuyGDClone__factory.ts +1 -1
- package/types/factories/CBATMock__factory.ts +1 -1
- package/types/factories/CDAILowWorthMock__factory.ts +1 -1
- package/types/factories/CDAIMock__factory.ts +1 -1
- package/types/factories/CDAINonMintableMock__factory.ts +1 -1
- package/types/factories/CDecimalsMock__factory.ts +1 -1
- package/types/factories/CSDTMock__factory.ts +1 -1
- package/types/factories/CUSDCMock__factory.ts +1 -1
- package/types/factories/ClaimersDistribution__factory.ts +1 -1
- package/types/factories/CompUSDMockOracle__factory.ts +1 -1
- package/types/factories/CompoundStakingFactory__factory.ts +1 -1
- package/types/factories/CompoundVotingMachine__factory.ts +1 -1
- package/types/factories/ConstantInflowNFT__factory.ts +758 -0
- package/types/factories/ConstantOutflowNFT__factory.ts +817 -0
- package/types/factories/DAIMock__factory.ts +1 -1
- package/types/factories/DAOContract__factory.ts +1 -1
- package/types/factories/DAOUpgradeableContract__factory.ts +1 -1
- package/types/factories/DaiEthPriceMockOracle__factory.ts +1 -1
- package/types/factories/DecimalsMock__factory.ts +1 -1
- package/types/factories/DistributionBridgeMock__factory.ts +121 -16
- package/types/factories/DistributionHelperTestHelper__factory.ts +255 -17
- package/types/factories/DistributionHelperTest__factory.ts +241 -16
- package/types/factories/DistributionHelper__factory.ts +241 -16
- package/types/factories/DonationsStaking__factory.ts +1 -1
- package/types/factories/ERC1967Proxy__factory.ts +1 -1
- package/types/factories/ERC20PresetMinterPauserUpgradeable__factory.ts +1 -1
- package/types/factories/ERC20Upgradeable__factory.ts +1 -1
- package/types/factories/EthUSDMockOracle__factory.ts +1 -1
- package/types/factories/EventsEmitter__factory.ts +1 -1
- package/types/factories/ExchangeHelper__factory.ts +1 -1
- package/types/factories/Faucet__factory.ts +1 -1
- package/types/factories/FeesFormulaMock__factory.ts +1 -1
- package/types/factories/FlowNFTBase__factory.ts +642 -0
- package/types/factories/FuseFaucetV2__factory.ts +1 -1
- package/types/factories/FuseFaucet__factory.ts +1 -1
- package/types/factories/FuseStakingV3__factory.ts +1 -1
- package/types/factories/GDFaucet__factory.ts +1 -1
- package/types/factories/GReputation__factory.ts +1 -1
- package/types/factories/GasPriceMockOracle__factory.ts +14 -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 +44 -18
- package/types/factories/GovernanceStaking__factory.ts +1 -1
- package/types/factories/IConstantFlowAgreementV1__factory.ts +1064 -0
- package/types/factories/IConstantInflowNFT__factory.ts +551 -0
- package/types/factories/IConstantOutflowNFT__factory.ts +614 -0
- package/types/factories/IERC721Metadata__factory.ts +356 -0
- package/types/factories/IERC721__factory.ts +308 -0
- package/types/factories/IFlowNFTBase__factory.ts +512 -0
- package/types/factories/IInstantDistributionAgreementV1__factory.ts +1015 -0
- package/types/factories/ILayerZeroFeeEstimator__factory.ts +79 -0
- package/types/factories/IMessagePassingBridge__factory.ts +446 -0
- package/types/factories/ISETHCustom__factory.ts +56 -0
- package/types/factories/ISETH__factory.ts +1866 -0
- package/types/factories/ISuperGoodDollar__factory.ts +159 -5
- package/types/factories/ISuperTokenFactory__factory.ts +5 -0
- package/types/factories/ISuperToken__factory.ts +130 -191
- package/types/factories/ISuperfluidGovernance__factory.ts +23 -5
- package/types/factories/ISuperfluid__factory.ts +10 -0
- package/types/factories/IdentityFix__factory.ts +1 -1
- package/types/factories/IdentityMock__factory.ts +1 -1
- package/types/factories/IdentityV2__factory.ts +1 -1
- package/types/factories/IncentiveControllerMock__factory.ts +1 -1
- package/types/factories/InvitesFuseV2__factory.ts +1 -1
- package/types/factories/InvitesV1__factory.ts +1 -1
- package/types/factories/InvitesV2__factory.ts +1 -1
- package/types/factories/LendingPoolMock__factory.ts +1 -1
- package/types/factories/Multicall__factory.ts +1 -1
- package/types/factories/MultichainBridgeHelper__factory.ts +1 -1
- package/types/factories/MultichainFeeFormula__factory.ts +113 -0
- package/types/factories/MultichainRouterMock__factory.ts +1 -1
- package/types/factories/NameService__factory.ts +1 -1
- package/types/factories/OneTimePaymentsV2__factory.ts +1 -1
- 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/PayableMock__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/ProxyFactory1967__factory.ts +1 -1
- package/types/factories/ReputationTestHelper__factory.ts +1 -1
- package/types/factories/Reputation__factory.ts +1 -1
- package/types/factories/SixteenDecimalsTokenMock__factory.ts +1 -1
- package/types/factories/StakersDistribution__factory.ts +1 -1
- package/types/factories/StakingMockFixedAPY__factory.ts +1 -1
- package/types/factories/SuperGoodDollar__factory.ts +230 -187
- package/types/factories/SuperToken__factory.ts +197 -192
- package/types/factories/SwapHelperTest__factory.ts +1 -1
- package/types/factories/TwentyDecimalsTokenMock__factory.ts +1 -1
- package/types/factories/UBISchemeV2__factory.ts +19 -1
- package/types/factories/UBIScheme__factory.ts +19 -1
- package/types/factories/USDCMock__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 +166 -4
- package/types/index.ts +34 -4
- package/yarn.lock +1288 -719
- package/artifacts/contracts/token/FeesFormula.sol/IFeesFormula.dbg.json +0 -4
- /package/contracts/token/{FeesFormula.sol → IFeesFormula.sol} +0 -0
|
@@ -1,37 +1,46 @@
|
|
|
1
1
|
import { Contract, ContractFactory, Signer } from "ethers";
|
|
2
2
|
import { network, ethers, upgrades, run } from "hardhat";
|
|
3
3
|
import * as safeethers from "ethers";
|
|
4
|
-
import { TransactionResponse } from "@ethersproject/providers";
|
|
4
|
+
import { TransactionResponse, TransactionReceipt } from "@ethersproject/providers";
|
|
5
5
|
import Safe from "@gnosis.pm/safe-core-sdk";
|
|
6
6
|
import EthersAdapter from "@gnosis.pm/safe-ethers-lib";
|
|
7
7
|
import { MetaTransactionData } from "@gnosis.pm/safe-core-sdk-types";
|
|
8
8
|
import SafeClient from "@gnosis.pm/safe-service-client";
|
|
9
|
+
|
|
9
10
|
import util from "util";
|
|
10
11
|
import dao from "../../releases/deployment.json";
|
|
11
12
|
|
|
12
13
|
const exec = util.promisify(require("child_process").exec);
|
|
13
14
|
|
|
14
|
-
const networkName =
|
|
15
|
+
const networkName =
|
|
16
|
+
network.name === "localhost" ? "production-mainnet" : network.name;
|
|
15
17
|
let totalGas = 0;
|
|
16
18
|
const gasUsage = {};
|
|
17
19
|
const GAS_SETTINGS = { gasLimit: 10000000 };
|
|
18
20
|
let release: { [key: string]: any } = dao[networkName];
|
|
19
21
|
|
|
20
22
|
export const verifyProductionSigner = signer => {
|
|
21
|
-
if (
|
|
23
|
+
if (
|
|
24
|
+
signer.address.toLowerCase() !==
|
|
25
|
+
"0x5128E3C1f8846724cc1007Af9b4189713922E4BB".toLowerCase()
|
|
26
|
+
) {
|
|
22
27
|
throw new Error(
|
|
23
28
|
"signer not 0x5128E3C1f8846724cc1007Af9b4189713922E4BB to get same deployed addresses on production"
|
|
24
29
|
);
|
|
25
30
|
}
|
|
26
31
|
};
|
|
27
|
-
export const printDeploy = async (
|
|
32
|
+
export const printDeploy = async (
|
|
33
|
+
c: Contract | TransactionResponse
|
|
34
|
+
): Promise<Contract | TransactionReceipt | TransactionResponse> => {
|
|
28
35
|
if (c instanceof Contract) {
|
|
29
36
|
await c.deployed();
|
|
30
37
|
console.log("deployed to: ", c.address);
|
|
38
|
+
return c.deployed();
|
|
31
39
|
}
|
|
32
40
|
if (c.wait) {
|
|
33
41
|
await c.wait();
|
|
34
42
|
console.log("tx done:", c.hash);
|
|
43
|
+
return c.wait();
|
|
35
44
|
}
|
|
36
45
|
return c;
|
|
37
46
|
};
|
|
@@ -47,7 +56,10 @@ export const countTotalGas = async (tx, name) => {
|
|
|
47
56
|
} else console.log("no gas data", { res, tx });
|
|
48
57
|
};
|
|
49
58
|
|
|
50
|
-
export const deploySuperGoodDollar = async (
|
|
59
|
+
export const deploySuperGoodDollar = async (
|
|
60
|
+
{ superfluidHost, superfluidInflowNFTLogic, superfluidOutflowNFTLogic },
|
|
61
|
+
tokenArgs
|
|
62
|
+
) => {
|
|
51
63
|
const SuperGoodDollar = (await deployDeterministic(
|
|
52
64
|
{
|
|
53
65
|
name: "SuperGoodDollar",
|
|
@@ -65,27 +77,91 @@ export const deploySuperGoodDollar = async (superfluidHost, tokenArgs) => {
|
|
|
65
77
|
[]
|
|
66
78
|
).then(printDeploy)) as Contract;
|
|
67
79
|
|
|
68
|
-
await GoodDollarProxy.initializeProxy(SuperGoodDollar.address).then(
|
|
80
|
+
await GoodDollarProxy.initializeProxy(SuperGoodDollar.address).then(
|
|
81
|
+
printDeploy
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
const OutFlowNFT = (await deployDeterministic(
|
|
85
|
+
{
|
|
86
|
+
name: "SuperGoodDollar OutflowNFT",
|
|
87
|
+
factory: uupsFactory
|
|
88
|
+
},
|
|
89
|
+
[]
|
|
90
|
+
).then(printDeploy)) as Contract;
|
|
91
|
+
|
|
92
|
+
const InFlowNFT = (await deployDeterministic(
|
|
93
|
+
{
|
|
94
|
+
name: "SuperGoodDollar InflowNFT",
|
|
95
|
+
factory: uupsFactory
|
|
96
|
+
},
|
|
97
|
+
[]
|
|
98
|
+
).then(printDeploy)) as Contract;
|
|
99
|
+
|
|
100
|
+
await OutFlowNFT.initializeProxy(superfluidOutflowNFTLogic);
|
|
101
|
+
await InFlowNFT.initializeProxy(superfluidInflowNFTLogic);
|
|
102
|
+
|
|
103
|
+
await SuperGoodDollar.attach(GoodDollarProxy.address)[
|
|
104
|
+
"initialize(string,string,uint256,address,address,address,address,address,address)"
|
|
105
|
+
](...tokenArgs, OutFlowNFT.address, InFlowNFT.address);
|
|
69
106
|
|
|
70
|
-
await
|
|
71
|
-
|
|
72
|
-
.
|
|
107
|
+
const GoodDollar = await ethers.getContractAt(
|
|
108
|
+
"ISuperGoodDollar",
|
|
109
|
+
GoodDollarProxy.address
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
const constantInflowNFT = await ethers.getContractAt(
|
|
113
|
+
"ConstantInflowNFT",
|
|
114
|
+
InFlowNFT.address
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
const constantOutflowNFT = await ethers.getContractAt(
|
|
118
|
+
"ConstantOutflowNFT",
|
|
119
|
+
OutFlowNFT.address
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
await constantOutflowNFT
|
|
123
|
+
.attach(OutFlowNFT.address)
|
|
124
|
+
.initialize(
|
|
125
|
+
GoodDollarProxy.address,
|
|
126
|
+
(await GoodDollar.symbol()) + " Outflow NFT",
|
|
127
|
+
(await GoodDollar.symbol()) + " COF"
|
|
128
|
+
);
|
|
129
|
+
await constantInflowNFT
|
|
130
|
+
.attach(InFlowNFT.address)
|
|
131
|
+
.initialize(
|
|
132
|
+
GoodDollarProxy.address,
|
|
133
|
+
(await GoodDollar.symbol()) + " Inflow NFT",
|
|
134
|
+
(await GoodDollar.symbol()) + " CIF"
|
|
135
|
+
);
|
|
73
136
|
|
|
74
|
-
const GoodDollar = await ethers.getContractAt("ISuperGoodDollar", GoodDollarProxy.address);
|
|
75
137
|
return GoodDollar;
|
|
76
138
|
};
|
|
77
139
|
|
|
78
|
-
export const deployDeterministic = async (
|
|
140
|
+
export const deployDeterministic = async (
|
|
141
|
+
contract,
|
|
142
|
+
args: any[],
|
|
143
|
+
factoryOpts = {},
|
|
144
|
+
redeployProxyFactory = false
|
|
145
|
+
) => {
|
|
79
146
|
try {
|
|
80
147
|
let proxyFactory;
|
|
81
148
|
if (networkName.startsWith("develop") && redeployProxyFactory) {
|
|
82
|
-
proxyFactory = await (
|
|
83
|
-
|
|
149
|
+
proxyFactory = await (
|
|
150
|
+
await ethers.getContractFactory("ProxyFactory1967")
|
|
151
|
+
).deploy();
|
|
152
|
+
} else
|
|
153
|
+
proxyFactory = await ethers.getContractAt(
|
|
154
|
+
"ProxyFactory1967",
|
|
155
|
+
release.ProxyFactory
|
|
156
|
+
);
|
|
84
157
|
const Contract =
|
|
85
|
-
(contract.factory as ContractFactory) ||
|
|
158
|
+
(contract.factory as ContractFactory) ||
|
|
159
|
+
(await ethers.getContractFactory(contract.name, factoryOpts));
|
|
86
160
|
|
|
87
161
|
const salt = ethers.BigNumber.from(
|
|
88
|
-
ethers.utils.keccak256(
|
|
162
|
+
ethers.utils.keccak256(
|
|
163
|
+
ethers.utils.toUtf8Bytes(contract.salt || contract.name)
|
|
164
|
+
)
|
|
89
165
|
);
|
|
90
166
|
|
|
91
167
|
if (contract.isUpgradeable === true) {
|
|
@@ -93,19 +169,30 @@ export const deployDeterministic = async (contract, args: any[], factoryOpts = {
|
|
|
93
169
|
args,
|
|
94
170
|
proxyFactory: proxyFactory.address
|
|
95
171
|
});
|
|
96
|
-
const encoded = Contract.interface.encodeFunctionData(
|
|
172
|
+
const encoded = Contract.interface.encodeFunctionData(
|
|
173
|
+
contract.initializer || "initialize",
|
|
174
|
+
args
|
|
175
|
+
);
|
|
97
176
|
const tx = await Contract.deploy(GAS_SETTINGS);
|
|
98
177
|
const impl = await tx.deployed();
|
|
99
178
|
console.log("implementation deployed:", contract.name, impl.address);
|
|
100
179
|
await countTotalGas(tx, contract.name);
|
|
101
180
|
|
|
102
|
-
const tx2 = await proxyFactory.deployProxy(
|
|
103
|
-
await countTotalGas(tx2, contract.name);
|
|
104
|
-
const deployTx = await tx2.wait().catch(e => console.error("failed to deploy proxy, assuming it exists...", e));
|
|
105
|
-
const proxyAddr = await proxyFactory["getDeploymentAddress(uint256,address)"](
|
|
181
|
+
const tx2 = await proxyFactory.deployProxy(
|
|
106
182
|
salt,
|
|
107
|
-
|
|
183
|
+
impl.address,
|
|
184
|
+
encoded,
|
|
185
|
+
GAS_SETTINGS
|
|
108
186
|
);
|
|
187
|
+
await countTotalGas(tx2, contract.name);
|
|
188
|
+
const deployTx = await tx2
|
|
189
|
+
.wait()
|
|
190
|
+
.catch(e =>
|
|
191
|
+
console.error("failed to deploy proxy, assuming it exists...", e)
|
|
192
|
+
);
|
|
193
|
+
const proxyAddr = await proxyFactory[
|
|
194
|
+
"getDeploymentAddress(uint256,address)"
|
|
195
|
+
](salt, await proxyFactory.signer.getAddress());
|
|
109
196
|
console.log("proxy deployed:", contract.name, proxyAddr);
|
|
110
197
|
return Contract.attach(proxyAddr);
|
|
111
198
|
} else {
|
|
@@ -114,10 +201,17 @@ export const deployDeterministic = async (contract, args: any[], factoryOpts = {
|
|
|
114
201
|
args
|
|
115
202
|
});
|
|
116
203
|
const constructor = Contract.interface.encodeDeploy(args);
|
|
117
|
-
const bytecode = ethers.utils.solidityPack(
|
|
118
|
-
|
|
204
|
+
const bytecode = ethers.utils.solidityPack(
|
|
205
|
+
["bytes", "bytes"],
|
|
206
|
+
[Contract.bytecode, constructor]
|
|
207
|
+
);
|
|
208
|
+
const deployTx = await (
|
|
209
|
+
await proxyFactory.deployCode(salt, bytecode, GAS_SETTINGS)
|
|
210
|
+
).wait();
|
|
119
211
|
|
|
120
|
-
const proxyAddr = await proxyFactory[
|
|
212
|
+
const proxyAddr = await proxyFactory[
|
|
213
|
+
"getDeploymentAddress(uint256,address,bytes32)"
|
|
214
|
+
](
|
|
121
215
|
salt,
|
|
122
216
|
await proxyFactory.signer.getAddress(),
|
|
123
217
|
ethers.utils.keccak256(bytecode)
|
|
@@ -141,7 +235,9 @@ export const executeViaGuardian = async (
|
|
|
141
235
|
network?: string
|
|
142
236
|
) => {
|
|
143
237
|
let release: { [key: string]: any } = dao[network || networkName];
|
|
144
|
-
const ctrl = await (
|
|
238
|
+
const ctrl = await (
|
|
239
|
+
await ethers.getContractAt("Controller", release.Controller)
|
|
240
|
+
).connect(guardian);
|
|
145
241
|
|
|
146
242
|
const results = [];
|
|
147
243
|
for (let i = 0; i < contracts.length; i++) {
|
|
@@ -149,29 +245,36 @@ export const executeViaGuardian = async (
|
|
|
149
245
|
console.log("executing:", contracts[i], functionSigs[i], functionInputs[i]);
|
|
150
246
|
const sigHash = ethers.utils.keccak256(ethers.utils.toUtf8Bytes(functionSigs[i])).slice(0, 10);
|
|
151
247
|
const encoded = ethers.utils.solidityPack(["bytes4", "bytes"], [sigHash, functionInputs[i]]);
|
|
152
|
-
if (contract
|
|
248
|
+
if (contract.toLowerCase().startsWith((await guardian.getAddress()).toLocaleLowerCase())) {
|
|
249
|
+
const [, target] = contract.split("_");
|
|
250
|
+
console.log("executing directly on target contract:", sigHash, encoded);
|
|
251
|
+
|
|
252
|
+
const tx = await guardian.sendTransaction({ to: target, data: encoded }).then(printDeploy);
|
|
253
|
+
results.push(tx);
|
|
254
|
+
} else if (contract === ctrl.address) {
|
|
153
255
|
console.log("executing directly on controller:", sigHash, encoded);
|
|
154
256
|
|
|
155
|
-
const tx = await guardian
|
|
156
|
-
|
|
157
|
-
.then(printDeploy)
|
|
158
|
-
.then(_ => _.wait());
|
|
257
|
+
const tx = await guardian.sendTransaction({ to: contract, data: encoded }).then(printDeploy);
|
|
258
|
+
|
|
159
259
|
results.push(tx);
|
|
160
260
|
} else {
|
|
161
|
-
const simulationResult = await ctrl.callStatic.genericCall(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
261
|
+
const simulationResult = await ctrl.callStatic.genericCall(
|
|
262
|
+
contract,
|
|
263
|
+
encoded,
|
|
264
|
+
release.Avatar,
|
|
265
|
+
ethValues[i],
|
|
266
|
+
{
|
|
267
|
+
from: await guardian.getAddress(),
|
|
268
|
+
value: ethValues[i]
|
|
269
|
+
}
|
|
270
|
+
);
|
|
165
271
|
console.log("executing genericCall:", {
|
|
166
272
|
sigHash,
|
|
167
273
|
encoded,
|
|
168
274
|
simulationResult
|
|
169
275
|
});
|
|
170
276
|
if (simulationResult[0] === false) throw new Error("simulation failed:" + contract);
|
|
171
|
-
const tx = await ctrl
|
|
172
|
-
.genericCall(contract, encoded, release.Avatar, ethValues[i])
|
|
173
|
-
.then(printDeploy)
|
|
174
|
-
.then(_ => _.wait());
|
|
277
|
+
const tx = await ctrl.genericCall(contract, encoded, release.Avatar, ethValues[i]).then(printDeploy);
|
|
175
278
|
// console.log("generic call events:", tx.events);
|
|
176
279
|
results.push(tx);
|
|
177
280
|
}
|
|
@@ -188,24 +291,32 @@ export const executeViaSafe = async (
|
|
|
188
291
|
safeSignerOrNetwork?: Signer | string,
|
|
189
292
|
isSimulation = false
|
|
190
293
|
) => {
|
|
191
|
-
if (
|
|
294
|
+
if (
|
|
295
|
+
typeof safeSignerOrNetwork !== "object" &&
|
|
296
|
+
!process.env.SAFEOWNER_PRIVATE_KEY
|
|
297
|
+
) {
|
|
192
298
|
throw new Error("safe signer is missing");
|
|
193
299
|
}
|
|
194
300
|
|
|
195
|
-
let safeSigner = new ethers.Wallet(
|
|
301
|
+
let safeSigner = new ethers.Wallet(
|
|
302
|
+
process.env.SAFEOWNER_PRIVATE_KEY,
|
|
303
|
+
new ethers.providers.CloudflareProvider()
|
|
304
|
+
);
|
|
196
305
|
if (typeof safeSignerOrNetwork === "string") {
|
|
197
306
|
switch (safeSignerOrNetwork) {
|
|
198
307
|
case "mainnet":
|
|
199
308
|
break;
|
|
200
309
|
case "celo":
|
|
201
|
-
safeSigner = new ethers.Wallet(
|
|
310
|
+
safeSigner = new ethers.Wallet(
|
|
311
|
+
process.env.SAFEOWNER_PRIVATE_KEY
|
|
312
|
+
).connect(
|
|
202
313
|
new ethers.providers.JsonRpcProvider("https://forno.celo.org")
|
|
203
314
|
);
|
|
204
315
|
break;
|
|
205
316
|
case "fuse":
|
|
206
|
-
safeSigner = new ethers.Wallet(
|
|
207
|
-
|
|
208
|
-
);
|
|
317
|
+
safeSigner = new ethers.Wallet(
|
|
318
|
+
process.env.SAFEOWNER_PRIVATE_KEY
|
|
319
|
+
).connect(new ethers.providers.JsonRpcProvider("https://rpc.fuse.io"));
|
|
209
320
|
break;
|
|
210
321
|
}
|
|
211
322
|
} else if (safeSignerOrNetwork) {
|
|
@@ -222,7 +333,7 @@ export const executeViaSafe = async (
|
|
|
222
333
|
txServiceUrl = "https://transaction-fuse.safe.fuse.io";
|
|
223
334
|
break;
|
|
224
335
|
case 42220:
|
|
225
|
-
txServiceUrl = "https://
|
|
336
|
+
txServiceUrl = "https://safe-transaction-celo.safe.global";
|
|
226
337
|
break;
|
|
227
338
|
}
|
|
228
339
|
console.log("creating safe adapter", { txServiceUrl });
|
|
@@ -240,7 +351,11 @@ export const executeViaSafe = async (
|
|
|
240
351
|
const safeSdk = await Safe.create({ ethAdapter, safeAddress });
|
|
241
352
|
|
|
242
353
|
let release: { [key: string]: any } = dao[networkName];
|
|
243
|
-
const ctrl = await ethers.getContractAt(
|
|
354
|
+
const ctrl = await ethers.getContractAt(
|
|
355
|
+
"Controller",
|
|
356
|
+
release.Controller,
|
|
357
|
+
null
|
|
358
|
+
);
|
|
244
359
|
|
|
245
360
|
const safeTransactionData: MetaTransactionData[] = [];
|
|
246
361
|
|
|
@@ -250,13 +365,32 @@ export const executeViaSafe = async (
|
|
|
250
365
|
const sigHash = ethers.utils.keccak256(ethers.utils.toUtf8Bytes(functionSigs[i])).slice(0, 10);
|
|
251
366
|
console.log("creating tx:", contracts[i], functionSigs[i], functionInputs[i]);
|
|
252
367
|
const encoded = ethers.utils.solidityPack(["bytes4", "bytes"], [sigHash, functionInputs[i]]);
|
|
253
|
-
if (contract
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
368
|
+
if (contract.toLowerCase().startsWith(safeAddress.toLocaleLowerCase())) {
|
|
369
|
+
const [, target] = contract.split("_");
|
|
370
|
+
const simulationResult = await ethers.provider.call({
|
|
371
|
+
to: target,
|
|
372
|
+
value: ethValues[i],
|
|
373
|
+
data: encoded,
|
|
374
|
+
from: safeAddress
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
console.log("executing from guardians safe:", {
|
|
378
|
+
sigHash,
|
|
379
|
+
encoded,
|
|
380
|
+
simulationResult
|
|
381
|
+
});
|
|
382
|
+
safeTransactionData.push({
|
|
383
|
+
to: target,
|
|
384
|
+
value: ethValues[i],
|
|
385
|
+
data: encoded
|
|
386
|
+
});
|
|
387
|
+
} else if (contract === ctrl.address) {
|
|
388
|
+
const simulationResult = await ethers.provider.call({
|
|
389
|
+
to: ctrl.address,
|
|
390
|
+
data: encoded,
|
|
391
|
+
from: safeAddress,
|
|
392
|
+
value: ethValues[i]
|
|
393
|
+
});
|
|
260
394
|
console.log("executing controller call:", {
|
|
261
395
|
sigHash,
|
|
262
396
|
encoded,
|
|
@@ -276,17 +410,16 @@ export const executeViaSafe = async (
|
|
|
276
410
|
value: ethValues[i]
|
|
277
411
|
});
|
|
278
412
|
|
|
279
|
-
const simulationResult =
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
value: ethValues[i]
|
|
284
|
-
}));
|
|
413
|
+
const simulationResult = await ctrl.callStatic.genericCall(contract, encoded, release.Avatar, ethValues[i], {
|
|
414
|
+
from: safeAddress,
|
|
415
|
+
value: ethValues[i]
|
|
416
|
+
});
|
|
285
417
|
console.log("executing genericCall simulation result:", {
|
|
286
418
|
sigHash,
|
|
287
419
|
simulationResult
|
|
288
420
|
});
|
|
289
|
-
if (isSimulation === true && simulationResult[0] === false)
|
|
421
|
+
if (isSimulation === true && simulationResult[0] === false)
|
|
422
|
+
throw new Error("simulation failed:" + contract);
|
|
290
423
|
const genericEncode = ctrl.interface.encodeFunctionData("genericCall", [
|
|
291
424
|
contract,
|
|
292
425
|
encoded,
|
|
@@ -332,12 +465,19 @@ export const verifyContract = async (
|
|
|
332
465
|
proxyName?: string,
|
|
333
466
|
forcedConstructorArguments?: string
|
|
334
467
|
) => {
|
|
335
|
-
let networkProvider = networkName.includes("-")
|
|
336
|
-
|
|
468
|
+
let networkProvider = networkName.includes("-")
|
|
469
|
+
? networkName.split("-")[1]
|
|
470
|
+
: "fuse";
|
|
471
|
+
networkProvider =
|
|
472
|
+
networkProvider === "mainnet" ? "ethereum" : networkProvider;
|
|
337
473
|
console.log("truffle compile...");
|
|
338
474
|
await exec("npx truffle compile");
|
|
339
|
-
const cmd = `npx truffle run verify ${
|
|
340
|
-
|
|
475
|
+
const cmd = `npx truffle run verify ${
|
|
476
|
+
proxyName ? "--custom-proxy " + proxyName : ""
|
|
477
|
+
} ${contractName}@${address} ${
|
|
478
|
+
forcedConstructorArguments
|
|
479
|
+
? "--forceConstructorArgs string:" + forcedConstructorArguments.slice(2)
|
|
480
|
+
: ""
|
|
341
481
|
} --network ${networkProvider}`;
|
|
342
482
|
console.log("running...:", cmd);
|
|
343
483
|
await exec(cmd).then(({ stdout, stderr }) => {
|