@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
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { ethers } from "hardhat";
|
|
2
|
+
import { loadFixture } from "@nomicfoundation/hardhat-network-helpers";
|
|
3
|
+
import { expect } from "chai";
|
|
4
|
+
import { SuperGoodDollar } from "../../types";
|
|
5
|
+
import { createDAO } from "../helpers";
|
|
6
|
+
import { BigNumber } from "ethers";
|
|
7
|
+
|
|
8
|
+
const BN = ethers.BigNumber;
|
|
9
|
+
|
|
10
|
+
describe("Celo Gas Token", () => {
|
|
11
|
+
let token: SuperGoodDollar, founder;
|
|
12
|
+
let signers;
|
|
13
|
+
|
|
14
|
+
const initialState = async () => {};
|
|
15
|
+
|
|
16
|
+
before(async () => {
|
|
17
|
+
[founder, ...signers] = await ethers.getSigners();
|
|
18
|
+
|
|
19
|
+
let { gd: gooddollar } = await loadFixture(createDAO);
|
|
20
|
+
|
|
21
|
+
token = (await ethers.getContractAt(
|
|
22
|
+
"SuperGoodDollar",
|
|
23
|
+
gooddollar
|
|
24
|
+
)) as SuperGoodDollar;
|
|
25
|
+
await token.mint(founder.address, ethers.constants.WeiPerEther.mul(100));
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("should debit sender for gas fees", async () => {
|
|
29
|
+
await loadFixture(initialState);
|
|
30
|
+
|
|
31
|
+
await founder.sendTransaction({
|
|
32
|
+
to: ethers.constants.AddressZero,
|
|
33
|
+
value: ethers.constants.WeiPerEther
|
|
34
|
+
});
|
|
35
|
+
const vm = await ethers.getImpersonatedSigner(ethers.constants.AddressZero);
|
|
36
|
+
let ts = await token.totalSupply();
|
|
37
|
+
let balance = await token.balanceOf(founder.address);
|
|
38
|
+
const fee = ethers.constants.WeiPerEther.div(100);
|
|
39
|
+
await token.connect(vm).debitGasFees(founder.address, BigNumber.from(fee));
|
|
40
|
+
expect(await token.balanceOf(founder.address)).eq(balance.sub(fee));
|
|
41
|
+
expect(await token.totalSupply()).eq(ts.sub(fee));
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("should credit sender for gas fees", async () => {
|
|
45
|
+
await loadFixture(initialState);
|
|
46
|
+
|
|
47
|
+
await founder.sendTransaction({
|
|
48
|
+
to: ethers.constants.AddressZero,
|
|
49
|
+
value: ethers.constants.WeiPerEther
|
|
50
|
+
});
|
|
51
|
+
const vm = await ethers.getImpersonatedSigner(ethers.constants.AddressZero);
|
|
52
|
+
let ts = await token.totalSupply();
|
|
53
|
+
let balance = await token.balanceOf(founder.address);
|
|
54
|
+
const fee = ethers.constants.WeiPerEther.div(100);
|
|
55
|
+
|
|
56
|
+
const [recipient, gateway, fund] = signers;
|
|
57
|
+
const [refund, recipientFee, gatewayFee, fundFee] = [
|
|
58
|
+
fee.div(10),
|
|
59
|
+
fee.div(100),
|
|
60
|
+
fee.div(200),
|
|
61
|
+
fee.div(300)
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
await token.connect(vm).debitGasFees(founder.address, BigNumber.from(fee));
|
|
65
|
+
await token
|
|
66
|
+
.connect(vm)
|
|
67
|
+
.creditGasFees(
|
|
68
|
+
founder.address,
|
|
69
|
+
recipient.address,
|
|
70
|
+
gateway.address,
|
|
71
|
+
fund.address,
|
|
72
|
+
refund,
|
|
73
|
+
recipientFee,
|
|
74
|
+
gatewayFee,
|
|
75
|
+
fundFee
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
expect(await token.balanceOf(founder.address)).eq(
|
|
79
|
+
balance.sub(fee).add(refund)
|
|
80
|
+
);
|
|
81
|
+
expect(await token.balanceOf(recipient.address)).eq(recipientFee);
|
|
82
|
+
expect(await token.balanceOf(gateway.address)).eq(gatewayFee);
|
|
83
|
+
expect(await token.balanceOf(fund.address)).eq(fundFee);
|
|
84
|
+
expect(await token.totalSupply()).eq(
|
|
85
|
+
ts.sub(fee).add(refund).add(recipientFee).add(gatewayFee).add(fundFee)
|
|
86
|
+
);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("should only be callable by VM", async () => {
|
|
90
|
+
await loadFixture(initialState);
|
|
91
|
+
|
|
92
|
+
await expect(
|
|
93
|
+
token.debitGasFees(founder.address, BigNumber.from(1))
|
|
94
|
+
).revertedWith("VM");
|
|
95
|
+
await expect(
|
|
96
|
+
token.creditGasFees(
|
|
97
|
+
founder.address,
|
|
98
|
+
founder.address,
|
|
99
|
+
founder.address,
|
|
100
|
+
founder.address,
|
|
101
|
+
1,
|
|
102
|
+
1,
|
|
103
|
+
1,
|
|
104
|
+
1
|
|
105
|
+
)
|
|
106
|
+
).revertedWith("VM");
|
|
107
|
+
});
|
|
108
|
+
});
|
|
@@ -15,7 +15,7 @@ let sf,
|
|
|
15
15
|
newHost,
|
|
16
16
|
identityMock,
|
|
17
17
|
receiverMock,
|
|
18
|
-
sgd, // stands for "SuperGoodDollar"
|
|
18
|
+
sgd: ISuperGoodDollar, // stands for "SuperGoodDollar"
|
|
19
19
|
feesFormula10PctMock;
|
|
20
20
|
|
|
21
21
|
const alotOfDollars = ethers.utils.parseEther("100000");
|
|
@@ -65,7 +65,8 @@ before(async function () {
|
|
|
65
65
|
founder
|
|
66
66
|
).deploy();
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
console.log("deploying test supergooddollar...");
|
|
69
|
+
sgd = (await deploySuperGoodDollar(sfContracts, [
|
|
69
70
|
"SuperGoodDollar",
|
|
70
71
|
"SGD",
|
|
71
72
|
0, // cap
|
|
@@ -73,7 +74,7 @@ before(async function () {
|
|
|
73
74
|
identityMock.address,
|
|
74
75
|
receiverMock.address,
|
|
75
76
|
founder.address
|
|
76
|
-
]);
|
|
77
|
+
])) as ISuperGoodDollar;
|
|
77
78
|
|
|
78
79
|
await sgd.mint(founder.address, alotOfDollars);
|
|
79
80
|
});
|
|
@@ -244,13 +245,17 @@ describe("SuperGoodDollar", async function () {
|
|
|
244
245
|
it("should not be able to initialize again", async () => {
|
|
245
246
|
await loadFixture(initialState);
|
|
246
247
|
await expect(
|
|
247
|
-
sgd[
|
|
248
|
+
sgd[
|
|
249
|
+
"initialize(string,string,uint256,address,address,address,address,address,address)"
|
|
250
|
+
](
|
|
248
251
|
"x",
|
|
249
252
|
"y",
|
|
250
253
|
1,
|
|
251
254
|
ethers.constants.AddressZero,
|
|
252
255
|
ethers.constants.AddressZero,
|
|
253
256
|
ethers.constants.AddressZero,
|
|
257
|
+
ethers.constants.AddressZero,
|
|
258
|
+
ethers.constants.AddressZero,
|
|
254
259
|
ethers.constants.AddressZero
|
|
255
260
|
)
|
|
256
261
|
).revertedWith("Initializable: contract is already initialized");
|
|
@@ -268,7 +273,7 @@ describe("SuperGoodDollar", async function () {
|
|
|
268
273
|
it("update the GoodDollar logic", async function () {
|
|
269
274
|
await loadFixture(initialState);
|
|
270
275
|
const sgdProxiable = await ethers.getContractAt(
|
|
271
|
-
"UUPSProxiable",
|
|
276
|
+
"contracts/token/superfluid/UUPSProxiable.sol:UUPSProxiable",
|
|
272
277
|
sgd.address,
|
|
273
278
|
founder.signer
|
|
274
279
|
);
|
|
@@ -295,13 +300,17 @@ describe("SuperGoodDollar", async function () {
|
|
|
295
300
|
|
|
296
301
|
expect(await sgd.getHost()).equal(newHost.address);
|
|
297
302
|
await expect(
|
|
298
|
-
sgd[
|
|
303
|
+
sgd[
|
|
304
|
+
"initialize(string,string,uint256,address,address,address,address,address,address)"
|
|
305
|
+
](
|
|
299
306
|
"x",
|
|
300
307
|
"y",
|
|
301
308
|
1,
|
|
302
309
|
ethers.constants.AddressZero,
|
|
303
310
|
ethers.constants.AddressZero,
|
|
304
311
|
ethers.constants.AddressZero,
|
|
312
|
+
ethers.constants.AddressZero,
|
|
313
|
+
ethers.constants.AddressZero,
|
|
305
314
|
ethers.constants.AddressZero
|
|
306
315
|
)
|
|
307
316
|
).revertedWith("Initializable: contract is already initialized");
|
|
@@ -30,7 +30,17 @@ describe("AdminWallet", () => {
|
|
|
30
30
|
before(async () => {
|
|
31
31
|
signers = await ethers.getSigners();
|
|
32
32
|
founder = signers[0];
|
|
33
|
-
[
|
|
33
|
+
[
|
|
34
|
+
whitelisted,
|
|
35
|
+
stranger,
|
|
36
|
+
stranger2,
|
|
37
|
+
blacklisted,
|
|
38
|
+
newUser,
|
|
39
|
+
newUser2,
|
|
40
|
+
admin,
|
|
41
|
+
admin2,
|
|
42
|
+
toWhitelist
|
|
43
|
+
] = signers.slice(10);
|
|
34
44
|
let { identity: id, nameService, gd } = await loadFixture(createDAO);
|
|
35
45
|
identity = await ethers.getContractAt("IdentityV2", id);
|
|
36
46
|
gooddollar = await ethers.getContractAt("GoodDollar", gd);
|
|
@@ -40,7 +50,10 @@ describe("AdminWallet", () => {
|
|
|
40
50
|
{ kind: "uups" }
|
|
41
51
|
)) as AdminWallet;
|
|
42
52
|
|
|
43
|
-
await identity.grantRole(
|
|
53
|
+
await identity.grantRole(
|
|
54
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("identity_admin")),
|
|
55
|
+
adminWallet.address
|
|
56
|
+
);
|
|
44
57
|
|
|
45
58
|
toppingTimes = await adminWallet.toppingTimes();
|
|
46
59
|
toppingAmount = await adminWallet.toppingAmount();
|
|
@@ -80,15 +93,21 @@ describe("AdminWallet", () => {
|
|
|
80
93
|
});
|
|
81
94
|
|
|
82
95
|
it("should have owner", async () => {
|
|
83
|
-
expect(
|
|
96
|
+
expect(
|
|
97
|
+
await adminWallet.hasRole(ethers.constants.HashZero, signers[0].address)
|
|
98
|
+
).to.eq(true);
|
|
84
99
|
});
|
|
85
100
|
|
|
86
101
|
it("should not top admin list when empty", async () => {
|
|
87
|
-
await expect(adminWallet["topAdmins(uint256)"](0)).revertedWith(
|
|
102
|
+
await expect(adminWallet["topAdmins(uint256)"](0)).revertedWith(
|
|
103
|
+
"Admin list is empty"
|
|
104
|
+
);
|
|
88
105
|
});
|
|
89
106
|
|
|
90
107
|
it("should add admins", async () => {
|
|
91
|
-
await adminWallet.addAdmins(
|
|
108
|
+
await adminWallet.addAdmins(
|
|
109
|
+
[whitelisted, admin, admin2].map(_ => _.address)
|
|
110
|
+
);
|
|
92
111
|
expect(await adminWallet.isAdmin(whitelisted.address)).true;
|
|
93
112
|
expect(await adminWallet.isAdmin(admin.address)).to.true;
|
|
94
113
|
expect(await adminWallet.isAdmin(admin2.address)).to.true;
|
|
@@ -105,14 +124,22 @@ describe("AdminWallet", () => {
|
|
|
105
124
|
expect(await ethers.provider.getBalance(admin2.address)).eq(0);
|
|
106
125
|
await adminWallet["topAdmins(uint256)"](0);
|
|
107
126
|
const newBalance = await ethers.provider.getBalance(admin2.address);
|
|
108
|
-
const adminTopAmount = await adminWallet
|
|
127
|
+
const adminTopAmount = await adminWallet
|
|
128
|
+
.adminToppingAmount()
|
|
129
|
+
.then(_ => _.toString());
|
|
109
130
|
expect(newBalance).to.be.equal(adminTopAmount);
|
|
110
131
|
});
|
|
111
132
|
|
|
112
133
|
it("should reimburse gas for admins", async () => {
|
|
113
|
-
const expectedTopping = await adminWallet
|
|
114
|
-
|
|
115
|
-
|
|
134
|
+
const expectedTopping = await adminWallet
|
|
135
|
+
.adminToppingAmount()
|
|
136
|
+
.then(_ => _.toString());
|
|
137
|
+
const adminWalletBalance = await ethers.provider.getBalance(
|
|
138
|
+
adminWallet.address
|
|
139
|
+
);
|
|
140
|
+
expect(expectedTopping).to.be.equal(
|
|
141
|
+
ethers.utils.parseUnits("90000000", "gwei")
|
|
142
|
+
);
|
|
116
143
|
expect(adminWalletBalance).gt(1);
|
|
117
144
|
let oldBalance = await ethers.provider.getBalance(admin2.address);
|
|
118
145
|
let toTransfer = oldBalance.div(2);
|
|
@@ -124,7 +151,12 @@ describe("AdminWallet", () => {
|
|
|
124
151
|
oldBalance = await ethers.provider.getBalance(admin2.address);
|
|
125
152
|
expect(oldBalance).to.be.lte(toTransfer);
|
|
126
153
|
|
|
127
|
-
await adminWallet
|
|
154
|
+
await adminWallet
|
|
155
|
+
.connect(admin2)
|
|
156
|
+
["whitelist(address,string)"](
|
|
157
|
+
toWhitelist.address,
|
|
158
|
+
"did:test" + Math.random()
|
|
159
|
+
);
|
|
128
160
|
const newBalance = await ethers.provider.getBalance(admin2.address);
|
|
129
161
|
expect(newBalance).to.be.gte(expectedTopping);
|
|
130
162
|
});
|
|
@@ -136,7 +168,9 @@ describe("AdminWallet", () => {
|
|
|
136
168
|
|
|
137
169
|
it("should allow admin to whitelist and remove whitelist", async () => {
|
|
138
170
|
expect(await identity.isWhitelisted(whitelisted.address)).to.false;
|
|
139
|
-
await adminWallet
|
|
171
|
+
await adminWallet
|
|
172
|
+
.connect(admin)
|
|
173
|
+
["whitelist(address,string)"](whitelisted.address, "did:test");
|
|
140
174
|
|
|
141
175
|
expect(await identity.isWhitelisted(whitelisted.address)).to.true;
|
|
142
176
|
await adminWallet.connect(admin).removeWhitelist(whitelisted.address);
|
|
@@ -146,14 +180,18 @@ describe("AdminWallet", () => {
|
|
|
146
180
|
it("should not allow non-admin to whitelist and remove whitelist", async () => {
|
|
147
181
|
expect(await identity.isWhitelisted(whitelisted.address)).to.false;
|
|
148
182
|
await expect(
|
|
149
|
-
adminWallet
|
|
183
|
+
adminWallet
|
|
184
|
+
.connect(stranger)
|
|
185
|
+
["whitelist(address,string)"](whitelisted.address, "did:test")
|
|
150
186
|
).revertedWith("Caller is not admin");
|
|
151
187
|
expect(await identity.isWhitelisted(whitelisted.address)).to.false;
|
|
152
|
-
await adminWallet
|
|
188
|
+
await adminWallet
|
|
189
|
+
.connect(admin)
|
|
190
|
+
["whitelist(address,string)"](whitelisted.address, "did:test");
|
|
153
191
|
expect(await identity.isWhitelisted(whitelisted.address)).to.true;
|
|
154
|
-
await expect(
|
|
155
|
-
|
|
156
|
-
);
|
|
192
|
+
await expect(
|
|
193
|
+
adminWallet.connect(stranger).removeWhitelist(whitelisted.address)
|
|
194
|
+
).revertedWith("Caller is not admin");
|
|
157
195
|
expect(await identity.isWhitelisted(whitelisted.address)).to.true;
|
|
158
196
|
});
|
|
159
197
|
|
|
@@ -168,13 +206,15 @@ describe("AdminWallet", () => {
|
|
|
168
206
|
|
|
169
207
|
it("should not allow non-admin to blacklist and remove blacklist", async () => {
|
|
170
208
|
expect(await identity.isBlacklisted(blacklisted.address)).to.false;
|
|
171
|
-
await expect(
|
|
209
|
+
await expect(
|
|
210
|
+
adminWallet.connect(stranger).blacklist(blacklisted.address)
|
|
211
|
+
).revertedWith("Caller is not admin");
|
|
172
212
|
expect(await identity.isBlacklisted(blacklisted.address)).to.false;
|
|
173
213
|
await adminWallet.connect(admin).blacklist(blacklisted.address);
|
|
174
214
|
expect(await identity.isBlacklisted(blacklisted.address)).to.true;
|
|
175
|
-
await expect(
|
|
176
|
-
|
|
177
|
-
);
|
|
215
|
+
await expect(
|
|
216
|
+
adminWallet.connect(stranger).removeBlacklist(blacklisted.address)
|
|
217
|
+
).revertedWith("Caller is not admin");
|
|
178
218
|
expect(await identity.isBlacklisted(blacklisted.address)).to.true;
|
|
179
219
|
await adminWallet.connect(admin).removeBlacklist(blacklisted.address);
|
|
180
220
|
expect(await identity.isBlacklisted(blacklisted.address)).to.false;
|
|
@@ -182,15 +222,16 @@ describe("AdminWallet", () => {
|
|
|
182
222
|
|
|
183
223
|
it("should not allow to top wallet if user balance is too high", async () => {
|
|
184
224
|
const walletBalance = await ethers.provider.getBalance(adminWallet.address);
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
expect(tx.logs.length).eq(0);
|
|
225
|
+
await expect(
|
|
226
|
+
adminWallet.connect(admin).topWallet(whitelisted.address)
|
|
227
|
+
).revertedWith("hasBalance");
|
|
189
228
|
});
|
|
190
229
|
|
|
191
230
|
it("should not allow to top wallet if user gd balance unchanged", async () => {
|
|
192
231
|
expect(await ethers.provider.getBalance(newUser.address)).eq(0);
|
|
193
|
-
await expect(
|
|
232
|
+
await expect(
|
|
233
|
+
adminWallet.connect(admin).topWallet(newUser.address)
|
|
234
|
+
).revertedWith("User has not used G$");
|
|
194
235
|
});
|
|
195
236
|
|
|
196
237
|
it("should allow to top wallet if user gd balance changed", async () => {
|
|
@@ -223,32 +264,50 @@ describe("AdminWallet", () => {
|
|
|
223
264
|
});
|
|
224
265
|
|
|
225
266
|
await gooddollar.mint(newUser.address, 1);
|
|
226
|
-
await expect(
|
|
227
|
-
|
|
228
|
-
);
|
|
267
|
+
await expect(
|
|
268
|
+
adminWallet.connect(admin).topWallet(newUser.address)
|
|
269
|
+
).revertedWith("User wallet has been topped too many times today");
|
|
229
270
|
});
|
|
230
271
|
|
|
231
272
|
it("should whitelist user", async () => {
|
|
232
273
|
expect(await identity.isWhitelisted(stranger2.address)).to.false;
|
|
233
|
-
await adminWallet
|
|
274
|
+
await adminWallet
|
|
275
|
+
.connect(admin2)
|
|
276
|
+
["whitelist(address,string)"](stranger2.address, "did:test3");
|
|
234
277
|
expect(await identity.isWhitelisted(stranger2.address)).to.true;
|
|
235
278
|
});
|
|
236
279
|
|
|
237
280
|
it("should not allow whitelisting with existing did", async () => {
|
|
238
|
-
await expect(
|
|
239
|
-
|
|
240
|
-
|
|
281
|
+
await expect(
|
|
282
|
+
adminWallet
|
|
283
|
+
.connect(admin2)
|
|
284
|
+
["whitelist(address,string)"](stranger.address, "did:test")
|
|
285
|
+
).revertedWith("DID already registered");
|
|
241
286
|
});
|
|
242
287
|
|
|
243
288
|
it("should not allow anyone to upgrade", async () => {
|
|
244
|
-
await expect(
|
|
289
|
+
await expect(
|
|
290
|
+
adminWallet.connect(admin2).upgradeTo(adminWallet.address)
|
|
291
|
+
).revertedWith("not owner");
|
|
245
292
|
});
|
|
246
293
|
|
|
247
294
|
it("should allow owner to upgrade", async () => {
|
|
248
|
-
const newver = await (
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
await
|
|
252
|
-
|
|
295
|
+
const newver = await (
|
|
296
|
+
await ethers.getContractFactory("AdminWallet")
|
|
297
|
+
).deploy();
|
|
298
|
+
await expect(adminWallet.connect(founder).upgradeTo(newver.address)).not
|
|
299
|
+
.reverted;
|
|
300
|
+
|
|
301
|
+
await upgrades.forceImport(
|
|
302
|
+
adminWallet.address,
|
|
303
|
+
await ethers.getContractFactory("AdminWallet"),
|
|
304
|
+
{ kind: "uups" }
|
|
305
|
+
);
|
|
306
|
+
await expect(
|
|
307
|
+
upgrades.upgradeProxy(
|
|
308
|
+
adminWallet.address,
|
|
309
|
+
await ethers.getContractFactory("AdminWallet")
|
|
310
|
+
)
|
|
311
|
+
).not.throws;
|
|
253
312
|
});
|
|
254
313
|
});
|
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import { ethers, upgrades } from "hardhat";
|
|
2
2
|
import { loadFixture } from "@nomicfoundation/hardhat-network-helpers";
|
|
3
3
|
import { expect } from "chai";
|
|
4
|
-
import {
|
|
5
|
-
GoodReserveCDai,
|
|
6
|
-
DistributionBridgeMock,
|
|
7
|
-
IGoodDollar
|
|
8
|
-
} from "../../types";
|
|
4
|
+
import { GoodReserveCDai, DistributionBridgeMock, IGoodDollar } from "../../types";
|
|
9
5
|
import { createDAO } from "../helpers";
|
|
10
6
|
|
|
11
7
|
export const NULL_ADDRESS = ethers.constants.AddressZero;
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
xdescribe("BuyAndBridgeHelper ", () => {
|
|
14
10
|
let goodReserve: GoodReserveCDai;
|
|
15
|
-
let goodDollar: IGoodDollar,
|
|
16
|
-
deployedDAO,
|
|
17
|
-
genericCall,
|
|
18
|
-
avatar,
|
|
19
|
-
founder,
|
|
20
|
-
signers,
|
|
21
|
-
setDAOAddress,
|
|
22
|
-
nameService,
|
|
23
|
-
cDai;
|
|
11
|
+
let goodDollar: IGoodDollar, deployedDAO, genericCall, avatar, founder, signers, setDAOAddress, nameService, cDai;
|
|
24
12
|
|
|
25
13
|
before(async () => {
|
|
26
14
|
[founder, ...signers] = await ethers.getSigners();
|
|
@@ -58,16 +46,10 @@ describe("BuyAndBridgeHelper ", () => {
|
|
|
58
46
|
|
|
59
47
|
await setDAOAddress("UNISWAP_ROUTER", signers[0].address);
|
|
60
48
|
|
|
61
|
-
const exchangeHelperFactory = await ethers.getContractFactory(
|
|
62
|
-
"ExchangeHelper"
|
|
63
|
-
);
|
|
49
|
+
const exchangeHelperFactory = await ethers.getContractFactory("ExchangeHelper");
|
|
64
50
|
const bnbFactory = await ethers.getContractFactory("BuyAndBridgeHelper");
|
|
65
51
|
|
|
66
|
-
const exchangeHelper = await upgrades.deployProxy(
|
|
67
|
-
exchangeHelperFactory,
|
|
68
|
-
[nameService.address],
|
|
69
|
-
{ kind: "uups" }
|
|
70
|
-
);
|
|
52
|
+
const exchangeHelper = await upgrades.deployProxy(exchangeHelperFactory, [nameService.address], { kind: "uups" });
|
|
71
53
|
|
|
72
54
|
await setDAOAddress("EXCHANGE_HELPER", exchangeHelper.address);
|
|
73
55
|
|
|
@@ -87,9 +69,7 @@ describe("BuyAndBridgeHelper ", () => {
|
|
|
87
69
|
expect(await exchangeHelper.gd()).equal(goodDollar.address);
|
|
88
70
|
expect(await exchangeHelper.fuseBridge()).equal(bridge.address);
|
|
89
71
|
expect(await exchangeHelper.multiChainBridge()).equal(bridge.address);
|
|
90
|
-
expect(await exchangeHelper.anyGoodDollar()).equal(
|
|
91
|
-
ethers.constants.AddressZero
|
|
92
|
-
);
|
|
72
|
+
expect(await exchangeHelper.anyGoodDollar()).equal(ethers.constants.AddressZero);
|
|
93
73
|
});
|
|
94
74
|
|
|
95
75
|
it("should buy and bridge to Fuse", async () => {
|
|
@@ -124,9 +104,7 @@ describe("BuyAndBridgeHelper ", () => {
|
|
|
124
104
|
const priceAfter = await goodReserve["currentPrice()"]();
|
|
125
105
|
const gdxBalanceAfter = await goodReserve.balanceOf(founder.address);
|
|
126
106
|
const bridgeBalanceAfter = await goodDollar.balanceOf(bridge.address);
|
|
127
|
-
const helperGdBalanceAfter = await goodDollar.balanceOf(
|
|
128
|
-
exchangeHelper.address
|
|
129
|
-
);
|
|
107
|
+
const helperGdBalanceAfter = await goodDollar.balanceOf(exchangeHelper.address);
|
|
130
108
|
|
|
131
109
|
expect(helperGdBalanceAfter).eq(0); //G$s should be at the fuse bridge
|
|
132
110
|
expect(helperBalanceAfter).equal(0);
|
|
@@ -143,7 +121,7 @@ describe("BuyAndBridgeHelper ", () => {
|
|
|
143
121
|
expect(events[0].args.data).to.equal(founder.address.toLowerCase());
|
|
144
122
|
});
|
|
145
123
|
|
|
146
|
-
|
|
124
|
+
xit("should buy and bridge to Celo", async () => {
|
|
147
125
|
const { exchangeHelper, bridge } = await loadFixture(fixture);
|
|
148
126
|
let daiAmount = ethers.utils.parseEther("100");
|
|
149
127
|
const dai = await ethers.getContractAt("DAIMock", deployedDAO.daiAddress);
|
|
@@ -176,9 +154,7 @@ describe("BuyAndBridgeHelper ", () => {
|
|
|
176
154
|
const priceAfter = await goodReserve["currentPrice()"]();
|
|
177
155
|
const gdxBalanceAfter = await goodReserve.balanceOf(founder.address);
|
|
178
156
|
const bridgeBalanceAfter = await goodDollar.balanceOf(bridge.address);
|
|
179
|
-
const helperGdBalanceAfter = await goodDollar.balanceOf(
|
|
180
|
-
exchangeHelper.address
|
|
181
|
-
);
|
|
157
|
+
const helperGdBalanceAfter = await goodDollar.balanceOf(exchangeHelper.address);
|
|
182
158
|
|
|
183
159
|
expect(helperGdBalanceAfter).gt(0); //in case of the mock it doesnt call transferFrom, so bought G$s stay in helper when testing multichain
|
|
184
160
|
expect(helperBalanceAfter).equal(0);
|
package/truffle-config.js
CHANGED
|
@@ -63,7 +63,10 @@ module.exports = {
|
|
|
63
63
|
network_id: 1
|
|
64
64
|
},
|
|
65
65
|
kovan: {
|
|
66
|
-
provider: () =>
|
|
66
|
+
provider: () =>
|
|
67
|
+
new Web3.providers.HttpProvider(
|
|
68
|
+
`https://ropsten.infura.io/v3/YOUR-PROJECT-ID`
|
|
69
|
+
),
|
|
67
70
|
network_id: 42, // Ropsten's id
|
|
68
71
|
gas: 5500000, // Ropsten has a lower block limit than mainnet
|
|
69
72
|
confirmations: 2, // # of confs to wait between deployments. (default: 0)
|
|
@@ -71,7 +74,10 @@ module.exports = {
|
|
|
71
74
|
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
|
72
75
|
},
|
|
73
76
|
ropsten: {
|
|
74
|
-
provider: () =>
|
|
77
|
+
provider: () =>
|
|
78
|
+
new Web3.providers.HttpProvider(
|
|
79
|
+
`https://ropsten.infura.io/v3/YOUR-PROJECT-ID`
|
|
80
|
+
),
|
|
75
81
|
network_id: 3, // Ropsten's id
|
|
76
82
|
gas: 5000000, // Ropsten has a lower block limit than mainnet
|
|
77
83
|
confirmations: 2, // # of confs to wait between deployments. (default: 0)
|
|
@@ -79,7 +85,8 @@ module.exports = {
|
|
|
79
85
|
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
|
80
86
|
},
|
|
81
87
|
goerli: {
|
|
82
|
-
provider: () =>
|
|
88
|
+
provider: () =>
|
|
89
|
+
new Web3.providers.HttpProvider(`https://rpc.ankr.io/eth_goerli`),
|
|
83
90
|
network_id: 5, // Ropsten's id
|
|
84
91
|
gas: 3000000, // Ropsten has a lower block limit than mainnet
|
|
85
92
|
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
|
@@ -93,7 +100,8 @@ module.exports = {
|
|
|
93
100
|
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
|
94
101
|
},
|
|
95
102
|
fusespark: {
|
|
96
|
-
provider: () =>
|
|
103
|
+
provider: () =>
|
|
104
|
+
new Web3.providers.HttpProvider(`https://rpc.fusespark.io`),
|
|
97
105
|
network_id: 123, // Ropsten's id
|
|
98
106
|
gas: 8000000, // Ropsten has a lower block limit than mainnet
|
|
99
107
|
confirmations: 1, // # of confs to wait between deployments. (default: 0)
|
|
@@ -108,8 +116,18 @@ module.exports = {
|
|
|
108
116
|
timeoutBlocks: 20, // # of blocks before a deployment times out (minimum/default: 50)
|
|
109
117
|
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
|
110
118
|
},
|
|
119
|
+
mainnet: {
|
|
120
|
+
provider: () =>
|
|
121
|
+
new Web3.providers.HttpProvider(`https://cloudflare-eth.com`),
|
|
122
|
+
network_id: 1,
|
|
123
|
+
gas: 150000,
|
|
124
|
+
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
|
125
|
+
},
|
|
111
126
|
alfajores: {
|
|
112
|
-
provider: () =>
|
|
127
|
+
provider: () =>
|
|
128
|
+
new Web3.providers.HttpProvider(
|
|
129
|
+
`https://alfajores-forno.celo-testnet.org`
|
|
130
|
+
),
|
|
113
131
|
network_id: 44787, // Ropsten's id
|
|
114
132
|
gas: 150000, // Ropsten has a lower block limit than mainnet
|
|
115
133
|
confirmations: 1, // # of confs to wait between deployments. (default: 0)
|
|
@@ -133,7 +151,7 @@ module.exports = {
|
|
|
133
151
|
// Configure your compilers
|
|
134
152
|
compilers: {
|
|
135
153
|
solc: {
|
|
136
|
-
version: "0.8.
|
|
154
|
+
version: "0.8.19", // Fetch exact version from solc-bin (default: truffle's version)
|
|
137
155
|
settings: {
|
|
138
156
|
// See the solidity docs for advice about optimization and evmVersion
|
|
139
157
|
optimizer: {
|