@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
|
@@ -4,392 +4,424 @@ pragma solidity >=0.8;
|
|
|
4
4
|
|
|
5
5
|
import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol";
|
|
6
6
|
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
|
|
7
|
-
import {
|
|
7
|
+
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import {ERC777Helper} from "@superfluid-finance/ethereum-contracts/contracts/libs/ERC777Helper.sol";
|
|
10
|
+
import {FixedSizeData} from "@superfluid-finance/ethereum-contracts/contracts/libs/FixedSizeData.sol";
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
import { IGoodDollarCustom } from "./ISuperGoodDollar.sol";
|
|
15
|
-
|
|
16
|
-
import { SuperToken } from "./SuperToken.sol";
|
|
12
|
+
import {IGoodDollarCustom} from "./ISuperGoodDollar.sol";
|
|
13
|
+
import {SuperToken} from "./SuperToken.sol";
|
|
17
14
|
import "../ERC677.sol";
|
|
18
|
-
import "../
|
|
15
|
+
import "../IFeesFormula.sol";
|
|
19
16
|
import "../../Interfaces.sol";
|
|
20
17
|
import "./ERC20Permit.sol";
|
|
21
|
-
import "./SuperToken.sol";
|
|
22
18
|
|
|
23
19
|
// import "hardhat/console.sol";
|
|
24
20
|
|
|
25
21
|
// IMPORTANT: The order of base contracts with storage MUST REMAIN AS IS after the initial deployment.
|
|
26
22
|
// Changing order can result in storage corruption when upgrading.
|
|
27
23
|
contract SuperGoodDollar is
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
SuperToken, // includes 32 storage slots padding for SuperToken
|
|
25
|
+
AccessControlEnumerableUpgradeable, // with storage
|
|
26
|
+
PausableUpgradeable,
|
|
27
|
+
ERC20Permit,
|
|
28
|
+
ERC677, // without storage
|
|
29
|
+
IGoodDollarCustom // without storage
|
|
34
30
|
{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
31
|
+
// IMPORTANT! Never change the type (storage size) or order of state variables.
|
|
32
|
+
// If a variable isn't needed anymore, leave it as padding (renaming is ok).
|
|
33
|
+
address public feeRecipient;
|
|
34
|
+
IFeesFormula public formula;
|
|
35
|
+
IIdentity public identity;
|
|
36
|
+
uint256 public cap;
|
|
37
|
+
bool public disableHostOperations;
|
|
38
|
+
// Append additional state variables here!
|
|
39
|
+
|
|
40
|
+
// ============== constants and immutables ==============
|
|
41
|
+
|
|
42
|
+
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
|
|
43
|
+
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
|
|
44
|
+
|
|
45
|
+
event TransferFee(
|
|
46
|
+
address from,
|
|
47
|
+
address to,
|
|
48
|
+
uint256 amount,
|
|
49
|
+
uint256 fee,
|
|
50
|
+
bool senderPays
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
// ========================================================================================
|
|
54
|
+
// ============== Functionality to be executed on the proxy via delegateCall ==============
|
|
55
|
+
// ========================================================================================
|
|
56
|
+
|
|
57
|
+
/// initializes state specific to the GoodDollar token
|
|
58
|
+
/// When upgrading to a new logic contract,
|
|
59
|
+
function initialize(
|
|
60
|
+
string calldata n,
|
|
61
|
+
string calldata s,
|
|
62
|
+
uint256 _cap,
|
|
63
|
+
IFeesFormula _formula,
|
|
64
|
+
IIdentity _identity,
|
|
65
|
+
address _feeRecipient,
|
|
66
|
+
address _owner,
|
|
67
|
+
IConstantOutflowNFT _outflowNFT,
|
|
68
|
+
IConstantInflowNFT _inflowNFT
|
|
69
|
+
) public initializer {
|
|
70
|
+
initialize(IERC20(address(0)), 18, n, s);
|
|
71
|
+
__AccessControl_init_unchained();
|
|
72
|
+
__Pausable_init_unchained();
|
|
73
|
+
__ERC20Permit_init(n);
|
|
74
|
+
_setupRole(DEFAULT_ADMIN_ROLE, _owner);
|
|
75
|
+
_setupRole(MINTER_ROLE, _owner);
|
|
76
|
+
_setupRole(PAUSER_ROLE, _owner);
|
|
77
|
+
feeRecipient = _feeRecipient;
|
|
78
|
+
identity = _identity;
|
|
79
|
+
formula = _formula;
|
|
80
|
+
cap = _cap;
|
|
81
|
+
_setNFTProxyContracts(
|
|
82
|
+
_outflowNFT,
|
|
83
|
+
_inflowNFT,
|
|
84
|
+
IPoolAdminNFT(address(0)),
|
|
85
|
+
IPoolMemberNFT(address(0))
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// ============ SuperFluid ============
|
|
90
|
+
|
|
91
|
+
constructor(ISuperfluid _host) SuperToken(_host) {}
|
|
92
|
+
|
|
93
|
+
function proxiableUUID() public pure override returns (bytes32) {
|
|
94
|
+
return
|
|
95
|
+
keccak256(
|
|
96
|
+
"org.superfluid-finance.contracts.SuperGoodDollar.implementation"
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function updateCode(address newAddress) external override {
|
|
101
|
+
_onlyOwner();
|
|
102
|
+
UUPSProxiable._updateCodeAddress(newAddress);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/// override Superfluid agreement function in order to make it pausable
|
|
106
|
+
/// that is, no new streams can be started when the contract is paused
|
|
107
|
+
function createAgreement(
|
|
108
|
+
bytes32 id,
|
|
109
|
+
bytes32[] calldata data
|
|
110
|
+
) public override(ISuperfluidToken, SuperfluidToken) {
|
|
111
|
+
require(!paused(), "Pausable: createAgreement while paused");
|
|
112
|
+
// otherwise the wrapper of SuperToken.createAgreement does the actual job
|
|
113
|
+
super.createAgreement(id, data);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/// failsafe in case we don't want to trust superfluid host for batch operations
|
|
117
|
+
function allowHostOperations()
|
|
118
|
+
internal
|
|
119
|
+
view
|
|
120
|
+
virtual
|
|
121
|
+
override
|
|
122
|
+
returns (bool hostEnabled)
|
|
123
|
+
{
|
|
124
|
+
return !disableHostOperations;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function enableHostOperations(bool enabled) external {
|
|
128
|
+
_onlyOwner();
|
|
129
|
+
disableHostOperations = !enabled;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// ============ IGoodDollarCustom ============
|
|
133
|
+
|
|
134
|
+
function owner() external view override returns (address) {
|
|
135
|
+
return getRoleMember(DEFAULT_ADMIN_ROLE, 0);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function setFormula(IFeesFormula _formula) external override {
|
|
139
|
+
_onlyOwner();
|
|
140
|
+
formula = _formula;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function setIdentity(IIdentityV2 _identity) external override {
|
|
144
|
+
_onlyOwner();
|
|
145
|
+
identity = _identity;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function transferOwnership(address _owner) public override {
|
|
149
|
+
_onlyOwner();
|
|
150
|
+
grantRole(DEFAULT_ADMIN_ROLE, _owner);
|
|
151
|
+
renounceRole(DEFAULT_ADMIN_ROLE, _msgSender());
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function isMinter(address _minter) external view override returns (bool) {
|
|
155
|
+
return hasRole(MINTER_ROLE, _minter);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function addMinter(address _minter) external override {
|
|
159
|
+
grantRole(MINTER_ROLE, _minter); // enforces permissions
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function renounceMinter() external override {
|
|
163
|
+
renounceRole(MINTER_ROLE, _msgSender()); // enforces permissions
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function isPauser(address _pauser) external view override returns (bool) {
|
|
167
|
+
return hasRole(PAUSER_ROLE, _pauser);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function addPauser(address _pauser) external override {
|
|
171
|
+
grantRole(PAUSER_ROLE, _pauser); // enforces permissions
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function pause() public override {
|
|
175
|
+
_onlyPauser();
|
|
176
|
+
_pause();
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function unpause() public override {
|
|
180
|
+
_onlyPauser();
|
|
181
|
+
_unpause();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @dev Processes transfer fees and calls ERC677Token transferAndCall function
|
|
186
|
+
* @param to address to transfer to
|
|
187
|
+
* @param amount the amount to transfer
|
|
188
|
+
* @param data The data to pass to transferAndCall
|
|
189
|
+
* @return a bool indicating if transfer function succeeded
|
|
190
|
+
*/
|
|
191
|
+
function transferAndCall(
|
|
192
|
+
address to,
|
|
193
|
+
uint256 amount,
|
|
194
|
+
bytes calldata data
|
|
195
|
+
) external override returns (bool) {
|
|
196
|
+
//duplicated code from _transferAndCall so we can get the amount after fees correctly for transferAndCall event + callback
|
|
197
|
+
_onlyNotPaused();
|
|
198
|
+
uint256 netAmount = _processFees(msg.sender, to, amount);
|
|
199
|
+
// handing over to the wrapper of SuperToken.transferFrom skipping this _transferFrom which also collects fees
|
|
200
|
+
bool res = super._transferFrom(msg.sender, msg.sender, to, netAmount);
|
|
201
|
+
emit ERC677.Transfer(msg.sender, to, netAmount, data);
|
|
202
|
+
if (isContract(to)) {
|
|
203
|
+
require(
|
|
204
|
+
contractFallback(to, netAmount, data),
|
|
205
|
+
"Contract fallback failed"
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
return res;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function transfer(
|
|
212
|
+
address to,
|
|
213
|
+
uint256 amount
|
|
214
|
+
) public virtual override(ERC677, SuperToken) returns (bool) {
|
|
215
|
+
return _transferFrom(msg.sender, msg.sender, to, amount);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/// make sure supertoken erc20 methods include fees and pausable
|
|
219
|
+
function _transferFrom(
|
|
220
|
+
address spender,
|
|
221
|
+
address holder,
|
|
222
|
+
address recipient,
|
|
223
|
+
uint256 amount
|
|
224
|
+
) internal virtual override returns (bool) {
|
|
225
|
+
_onlyNotPaused();
|
|
226
|
+
uint256 bruttoValue = _processFees(holder, recipient, amount);
|
|
227
|
+
// handing over to the wrapper of SuperToken.transferFrom
|
|
228
|
+
super._transferFrom(spender, holder, recipient, bruttoValue);
|
|
229
|
+
return true;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/// make sure supertoken erc777 methods include fees and pausable
|
|
233
|
+
function _send(
|
|
234
|
+
address operator,
|
|
235
|
+
address from,
|
|
236
|
+
address to,
|
|
237
|
+
uint256 amount,
|
|
238
|
+
bytes memory userData,
|
|
239
|
+
bytes memory operatorData,
|
|
240
|
+
bool requireReceptionAck
|
|
241
|
+
) internal virtual override {
|
|
242
|
+
_onlyNotPaused();
|
|
243
|
+
uint256 bruttoValue = _processFees(from, to, amount);
|
|
244
|
+
// handing over to the wrapper of SuperToken.transferFrom
|
|
245
|
+
super._send(
|
|
246
|
+
operator,
|
|
247
|
+
from,
|
|
248
|
+
to,
|
|
249
|
+
bruttoValue,
|
|
250
|
+
userData,
|
|
251
|
+
operatorData,
|
|
252
|
+
requireReceptionAck
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/// make sure supertoken erc777 methods include pausable
|
|
257
|
+
function _burn(
|
|
258
|
+
address operator,
|
|
259
|
+
address from,
|
|
260
|
+
uint256 amount,
|
|
261
|
+
bytes memory userData,
|
|
262
|
+
bytes memory operatorData
|
|
263
|
+
) internal virtual override {
|
|
264
|
+
_onlyNotPaused();
|
|
265
|
+
// handing over to the wrapper of SuperToken.transferFrom
|
|
266
|
+
super._burn(operator, from, amount, userData, operatorData);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @dev Minting function
|
|
271
|
+
* @param to the address that will receive the minted tokens
|
|
272
|
+
* @param amount the amount of tokens to mint
|
|
273
|
+
*/
|
|
274
|
+
function mint(
|
|
275
|
+
address to,
|
|
276
|
+
uint256 amount
|
|
277
|
+
) public override(IGoodDollarCustom) onlyMinter returns (bool) {
|
|
278
|
+
_onlyNotPaused();
|
|
279
|
+
|
|
280
|
+
if (cap > 0) {
|
|
281
|
+
require(
|
|
282
|
+
totalSupply() + amount <= cap,
|
|
283
|
+
"Cannot increase supply beyond cap"
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
_mint(
|
|
287
|
+
msg.sender,
|
|
288
|
+
to,
|
|
289
|
+
amount,
|
|
290
|
+
false /* requireReceptionAck */,
|
|
291
|
+
new bytes(0),
|
|
292
|
+
new bytes(0)
|
|
293
|
+
);
|
|
294
|
+
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function burnFrom(address account, uint256 amount) public {
|
|
299
|
+
uint256 currentAllowance = allowance(account, _msgSender());
|
|
300
|
+
require(
|
|
301
|
+
currentAllowance >= amount,
|
|
302
|
+
"ERC20: burn amount exceeds allowance"
|
|
303
|
+
);
|
|
304
|
+
unchecked {
|
|
305
|
+
_approve(account, _msgSender(), currentAllowance - amount);
|
|
306
|
+
}
|
|
307
|
+
_burn(msg.sender, account, amount, new bytes(0), new bytes(0));
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
function burn(uint256 amount) external override {
|
|
311
|
+
_burn(msg.sender, msg.sender, amount, new bytes(0), new bytes(0));
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* @dev Gets the current transaction fees
|
|
316
|
+
* @return fee senderPays that represents the current transaction fees and bool true if sender pays the fee or receiver
|
|
317
|
+
*/
|
|
318
|
+
function getFees(
|
|
319
|
+
uint256 amount
|
|
320
|
+
) public view returns (uint256 fee, bool senderPays) {
|
|
321
|
+
return formula.getTxFees(amount, address(0), address(0));
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* @dev Gets the current transaction fees
|
|
326
|
+
* @return fee senderPays that represents the current transaction fees and bool true if sender pays the fee or receiver
|
|
327
|
+
*/
|
|
328
|
+
function getFees(
|
|
329
|
+
uint256 amount,
|
|
330
|
+
address sender,
|
|
331
|
+
address recipient
|
|
332
|
+
) public view returns (uint256 fee, bool senderPays) {
|
|
333
|
+
return formula.getTxFees(amount, sender, recipient);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* @dev Sets the address that receives the transactional fees.
|
|
338
|
+
* can only be called by owner
|
|
339
|
+
* @param _feeRecipient The new address to receive transactional fees
|
|
340
|
+
*/
|
|
341
|
+
function setFeeRecipient(address _feeRecipient) public {
|
|
342
|
+
_onlyOwner();
|
|
343
|
+
feeRecipient = _feeRecipient;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// internal functions
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* @dev Sends transactional fees to feeRecipient address from given address
|
|
350
|
+
* @param account The account that sends the fees
|
|
351
|
+
* @param amount The amount to subtract fees from
|
|
352
|
+
* @return an uint256 that represents the given amount minus the transactional fees
|
|
353
|
+
*/
|
|
354
|
+
function _processFees(
|
|
355
|
+
address account,
|
|
356
|
+
address recipient,
|
|
357
|
+
uint256 amount
|
|
358
|
+
) internal returns (uint256) {
|
|
359
|
+
(uint256 txFees, bool senderPays) = getFees(amount, account, recipient);
|
|
360
|
+
if (txFees > 0 && !identity.isDAOContract(msg.sender)) {
|
|
361
|
+
require(
|
|
362
|
+
senderPays == false || amount + txFees <= balanceOf(account),
|
|
363
|
+
"Not enough balance to pay TX fee"
|
|
364
|
+
);
|
|
365
|
+
super._transferFrom(account, account, feeRecipient, txFees);
|
|
366
|
+
emit TransferFee(account, recipient, amount, txFees, senderPays);
|
|
367
|
+
return senderPays ? amount : amount - txFees;
|
|
368
|
+
}
|
|
369
|
+
return amount;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**************************************************************************
|
|
373
|
+
* ERC20x-specific Functions
|
|
374
|
+
*************************************************************************/
|
|
375
|
+
|
|
376
|
+
function setNFTProxyContracts(
|
|
377
|
+
IConstantOutflowNFT _constantOutflowNFT,
|
|
378
|
+
IConstantInflowNFT _constantInflowNFT,
|
|
379
|
+
IPoolAdminNFT _poolAdminNFT,
|
|
380
|
+
IPoolMemberNFT _poolMemberNFT
|
|
381
|
+
) public {
|
|
382
|
+
_onlyOwner();
|
|
383
|
+
_setNFTProxyContracts(
|
|
384
|
+
_constantOutflowNFT,
|
|
385
|
+
_constantInflowNFT,
|
|
386
|
+
_poolAdminNFT,
|
|
387
|
+
_poolMemberNFT
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
function _setNFTProxyContracts(
|
|
392
|
+
IConstantOutflowNFT _constantOutflowNFT,
|
|
393
|
+
IConstantInflowNFT _constantInflowNFT,
|
|
394
|
+
IPoolAdminNFT _poolAdminNFT,
|
|
395
|
+
IPoolMemberNFT _poolMemberNFT
|
|
396
|
+
) internal {
|
|
397
|
+
constantOutflowNFT = _constantOutflowNFT;
|
|
398
|
+
constantInflowNFT = _constantInflowNFT;
|
|
399
|
+
poolAdminNFT = _poolAdminNFT;
|
|
400
|
+
poolMemberNFT = _poolMemberNFT;
|
|
401
|
+
|
|
402
|
+
// emit NFT proxy creation events
|
|
403
|
+
emit ConstantOutflowNFTCreated(constantOutflowNFT);
|
|
404
|
+
emit ConstantInflowNFTCreated(constantInflowNFT);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**************************************************************************
|
|
408
|
+
* Modifiers
|
|
409
|
+
*************************************************************************/
|
|
410
|
+
|
|
411
|
+
function _onlyOwner() internal view {
|
|
412
|
+
require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "not owner");
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
function _onlyPauser() internal view {
|
|
416
|
+
require(hasRole(PAUSER_ROLE, msg.sender), "not pauser");
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
function _onlyNotPaused() internal view {
|
|
420
|
+
require(!paused(), "Pausable: token transfer while paused");
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
modifier onlyMinter() {
|
|
424
|
+
require(hasRole(MINTER_ROLE, msg.sender), "not minter");
|
|
425
|
+
_;
|
|
426
|
+
}
|
|
395
427
|
}
|