@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.
Files changed (489) hide show
  1. package/artifacts/abis/DistributionBridgeMock.min.json +1 -1
  2. package/artifacts/abis/DistributionHelper.min.json +1 -1
  3. package/artifacts/abis/DistributionHelperTest.min.json +1 -1
  4. package/artifacts/abis/DistributionHelperTestHelper.min.json +1 -1
  5. package/artifacts/abis/GasPriceMockOracle.min.json +1 -1
  6. package/artifacts/abis/GoodCompoundStakingTest.min.json +1 -1
  7. package/artifacts/abis/GoodReserveCDai.min.json +1 -1
  8. package/artifacts/abis/IFeesFormula.min.json +1 -1
  9. package/artifacts/abis/ISuperGoodDollar.min.json +1 -1
  10. package/artifacts/abis/ISuperToken.min.json +1 -0
  11. package/artifacts/abis/MultichainFeeFormula.min.json +1 -0
  12. package/artifacts/abis/SuperGoodDollar.min.json +1 -1
  13. package/artifacts/abis/SuperToken.min.json +1 -1
  14. package/artifacts/abis/UBIScheme.min.json +1 -1
  15. package/artifacts/abis/UBISchemeV2.min.json +1 -1
  16. package/artifacts/contracts/DAOStackInterfaces.sol/Avatar.dbg.json +1 -1
  17. package/artifacts/contracts/DAOStackInterfaces.sol/Controller.dbg.json +1 -1
  18. package/artifacts/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface.dbg.json +1 -1
  19. package/artifacts/contracts/DAOStackInterfaces.sol/IntVoteInterface.dbg.json +1 -1
  20. package/artifacts/contracts/DAOStackInterfaces.sol/ReputationInterface.dbg.json +1 -1
  21. package/artifacts/contracts/DAOStackInterfaces.sol/SchemeRegistrar.dbg.json +1 -1
  22. package/artifacts/contracts/Interfaces.sol/AggregatorV3Interface.dbg.json +1 -1
  23. package/artifacts/contracts/Interfaces.sol/ERC20.dbg.json +1 -1
  24. package/artifacts/contracts/Interfaces.sol/IAaveIncentivesController.dbg.json +1 -1
  25. package/artifacts/contracts/Interfaces.sol/IAdminWallet.dbg.json +1 -1
  26. package/artifacts/contracts/Interfaces.sol/IDonationStaking.dbg.json +1 -1
  27. package/artifacts/contracts/Interfaces.sol/IERC2917.dbg.json +1 -1
  28. package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.dbg.json +1 -1
  29. package/artifacts/contracts/Interfaces.sol/IGoodDollar.dbg.json +1 -1
  30. package/artifacts/contracts/Interfaces.sol/IGoodStaking.dbg.json +1 -1
  31. package/artifacts/contracts/Interfaces.sol/IHasRouter.dbg.json +1 -1
  32. package/artifacts/contracts/Interfaces.sol/IIdentity.dbg.json +1 -1
  33. package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +1 -1
  34. package/artifacts/contracts/Interfaces.sol/ILendingPool.dbg.json +1 -1
  35. package/artifacts/contracts/Interfaces.sol/IMultichainRouter.dbg.json +1 -1
  36. package/artifacts/contracts/Interfaces.sol/INameService.dbg.json +1 -1
  37. package/artifacts/contracts/Interfaces.sol/IUBIScheme.dbg.json +1 -1
  38. package/artifacts/contracts/Interfaces.sol/ProxyAdmin.dbg.json +1 -1
  39. package/artifacts/contracts/Interfaces.sol/Reserve.dbg.json +1 -1
  40. package/artifacts/contracts/Interfaces.sol/Staking.dbg.json +1 -1
  41. package/artifacts/contracts/Interfaces.sol/Uniswap.dbg.json +1 -1
  42. package/artifacts/contracts/Interfaces.sol/UniswapFactory.dbg.json +1 -1
  43. package/artifacts/contracts/Interfaces.sol/UniswapPair.dbg.json +1 -1
  44. package/artifacts/contracts/Interfaces.sol/cERC20.dbg.json +1 -1
  45. package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
  46. package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.json +2 -2
  47. package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
  48. package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.json +2 -2
  49. package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.dbg.json +1 -1
  50. package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.json +2 -2
  51. package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
  52. package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.json +2 -2
  53. package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
  54. package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.json +2 -2
  55. package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
  56. package/artifacts/contracts/governance/GReputation.sol/GReputation.json +2 -2
  57. package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.dbg.json +1 -1
  58. package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.json +2 -2
  59. package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +1 -1
  60. package/artifacts/contracts/governance/GoodDollarStaking.sol/IStakingUpgrade.dbg.json +1 -1
  61. package/artifacts/contracts/governance/GoodDollarStaking.sol/RewardsMinter.dbg.json +1 -1
  62. package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
  63. package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.json +2 -2
  64. package/artifacts/contracts/governance/MultiBaseGovernanceShareField.sol/MultiBaseGovernanceShareField.dbg.json +1 -1
  65. package/artifacts/contracts/governance/Reputation.sol/Reputation.dbg.json +1 -1
  66. package/artifacts/contracts/governance/Reputation.sol/Reputation.json +2 -2
  67. package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
  68. package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.json +2 -2
  69. package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
  70. package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.json +2 -2
  71. package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
  72. package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.json +2 -2
  73. package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
  74. package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.json +2 -2
  75. package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +1 -1
  76. package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.json +2 -2
  77. package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
  78. package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.json +2 -2
  79. package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
  80. package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.json +2 -2
  81. package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
  82. package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.json +2 -2
  83. package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
  84. package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.json +2 -2
  85. package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
  86. package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.json +2 -2
  87. package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
  88. package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.json +2 -2
  89. package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
  90. package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.json +2 -2
  91. package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.dbg.json +1 -1
  92. package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.json +122 -17
  93. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
  94. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.json +242 -17
  95. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
  96. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.json +256 -18
  97. package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.dbg.json +1 -1
  98. package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.json +2 -2
  99. package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
  100. package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.json +2 -2
  101. package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
  102. package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.json +15 -2
  103. package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
  104. package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.json +6 -6
  105. package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
  106. package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.json +2 -2
  107. package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
  108. package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.json +2 -2
  109. package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.dbg.json +1 -1
  110. package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.json +2 -2
  111. package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.dbg.json +1 -1
  112. package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.json +2 -2
  113. package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
  114. package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.json +2 -2
  115. package/artifacts/contracts/mocks/MultichainRouterMock.sol/IWrapper.dbg.json +1 -1
  116. package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.dbg.json +1 -1
  117. package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.json +2 -2
  118. package/artifacts/contracts/mocks/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
  119. package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
  120. package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.json +2 -2
  121. package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
  122. package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.json +2 -2
  123. package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.dbg.json +1 -1
  124. package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.json +2 -2
  125. package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
  126. package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.json +2 -2
  127. package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
  128. package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.json +2 -2
  129. package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
  130. package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.json +2 -2
  131. package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
  132. package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.json +2 -2
  133. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
  134. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.json +2 -2
  135. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
  136. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.json +2 -2
  137. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
  138. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.json +2 -2
  139. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
  140. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.json +2 -2
  141. package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
  142. package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.json +2 -2
  143. package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
  144. package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.json +2 -2
  145. package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
  146. package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.json +2 -2
  147. package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
  148. package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.json +2 -2
  149. package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
  150. package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.json +2 -2
  151. package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
  152. package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.json +2 -2
  153. package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
  154. package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.json +2 -2
  155. package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
  156. package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.json +2 -2
  157. package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
  158. package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.json +242 -17
  159. package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.dbg.json +1 -1
  160. package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.json +2 -2
  161. package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.dbg.json +1 -1
  162. package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.json +2 -2
  163. package/artifacts/contracts/reserve/GoodReserveCDai.sol/ContributionCalc.dbg.json +1 -1
  164. package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.dbg.json +1 -1
  165. package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.json +45 -19
  166. package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
  167. package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.json +2 -2
  168. package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
  169. package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.json +2 -2
  170. package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.dbg.json +1 -1
  171. package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.json +2 -2
  172. package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.dbg.json +1 -1
  173. package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.json +2 -2
  174. package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.dbg.json +1 -1
  175. package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.dbg.json +1 -1
  176. package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.dbg.json +1 -1
  177. package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.json +2 -2
  178. package/artifacts/contracts/staking/SimpleStaking.sol/SimpleStaking.dbg.json +1 -1
  179. package/artifacts/contracts/staking/SimpleStakingV2.sol/SimpleStakingV2.dbg.json +1 -1
  180. package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.dbg.json +1 -1
  181. package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.json +2 -2
  182. package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.dbg.json +1 -1
  183. package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.json +2 -2
  184. package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
  185. package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.json +2 -2
  186. package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
  187. package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.json +2 -2
  188. package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
  189. package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.json +2 -2
  190. package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
  191. package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.json +2 -2
  192. package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
  193. package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.json +2 -2
  194. package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.dbg.json +1 -1
  195. package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.json +2 -2
  196. package/artifacts/contracts/staking/utils/StakingRewardsFixedAPY.sol/StakingRewardsFixedAPY.dbg.json +1 -1
  197. package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.dbg.json +1 -1
  198. package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.json +2 -2
  199. package/artifacts/contracts/token/ERC677.sol/ERC677.dbg.json +1 -1
  200. package/artifacts/contracts/token/ERC677.sol/ERC677Receiver.dbg.json +1 -1
  201. package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.dbg.json +1 -1
  202. package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.json +2 -2
  203. package/artifacts/contracts/token/IFeesFormula.sol/IFeesFormula.dbg.json +4 -0
  204. package/artifacts/contracts/token/{FeesFormula.sol → IFeesFormula.sol}/IFeesFormula.json +1 -1
  205. package/artifacts/contracts/token/MultichainFeeFormula.sol/MultichainFeeFormula.dbg.json +4 -0
  206. package/artifacts/contracts/token/MultichainFeeFormula.sol/MultichainFeeFormula.json +58 -0
  207. package/artifacts/contracts/token/superfluid/ERC20Permit.sol/ERC20Permit.dbg.json +1 -1
  208. package/artifacts/contracts/token/superfluid/ERC20Permit.sol/SelfApprove.dbg.json +1 -1
  209. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/IGoodDollarCustom.dbg.json +1 -1
  210. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/ISuperGoodDollar.dbg.json +1 -1
  211. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/ISuperGoodDollar.json +159 -5
  212. package/artifacts/contracts/token/superfluid/ISuperToken.sol/ISuperToken.dbg.json +4 -0
  213. package/artifacts/contracts/token/superfluid/ISuperToken.sol/ISuperToken.json +1609 -0
  214. package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
  215. package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +233 -190
  216. package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
  217. package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.json +198 -193
  218. package/artifacts/contracts/token/superfluid/SuperfluidToken.sol/SuperfluidToken.dbg.json +1 -1
  219. package/artifacts/contracts/token/superfluid/UUPSProxiable.sol/UUPSProxiable.dbg.json +1 -1
  220. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/Proxy.dbg.json +1 -1
  221. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.dbg.json +1 -1
  222. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.json +2 -2
  223. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.dbg.json +1 -1
  224. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.json +2 -2
  225. package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.dbg.json +1 -1
  226. package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.json +20 -2
  227. package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.dbg.json +1 -1
  228. package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.json +20 -2
  229. package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
  230. package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.json +2 -2
  231. package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
  232. package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.json +2 -2
  233. package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.dbg.json +1 -1
  234. package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.json +2 -2
  235. package/artifacts/contracts/utils/BulkProof.sol/BulkProof.dbg.json +1 -1
  236. package/artifacts/contracts/utils/BulkProof.sol/BulkProof.json +2 -2
  237. package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.dbg.json +1 -1
  238. package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.json +2 -2
  239. package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.dbg.json +1 -1
  240. package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.json +2 -2
  241. package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.dbg.json +1 -1
  242. package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.json +2 -2
  243. package/artifacts/contracts/utils/BuyGDClone.sol/ISwapRouter.dbg.json +1 -1
  244. package/artifacts/contracts/utils/DAOContract.sol/DAOContract.dbg.json +1 -1
  245. package/artifacts/contracts/utils/DAOContract.sol/DAOContract.json +2 -2
  246. package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
  247. package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.json +2 -2
  248. package/artifacts/contracts/utils/DSMath.sol/DSMath.dbg.json +1 -1
  249. package/artifacts/contracts/utils/DSMath.sol/DSMath.json +2 -2
  250. package/artifacts/contracts/utils/DataTypes.sol/DataTypes.dbg.json +1 -1
  251. package/artifacts/contracts/utils/DataTypes.sol/DataTypes.json +2 -2
  252. package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.dbg.json +1 -1
  253. package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.json +2 -2
  254. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
  255. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.json +2 -2
  256. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/IRouter.dbg.json +1 -1
  257. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/PausableControl.dbg.json +1 -1
  258. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.dbg.json +1 -1
  259. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.json +2 -2
  260. package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.dbg.json +1 -1
  261. package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.json +2 -2
  262. package/artifacts/contracts/utils/MultiCall.sol/Multicall.dbg.json +1 -1
  263. package/artifacts/contracts/utils/MultiCall.sol/Multicall.json +2 -2
  264. package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.dbg.json +1 -1
  265. package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.json +2 -2
  266. package/artifacts/contracts/utils/NameService.sol/NameService.dbg.json +1 -1
  267. package/artifacts/contracts/utils/NameService.sol/NameService.json +2 -2
  268. package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.dbg.json +1 -1
  269. package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.json +2 -2
  270. package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.dbg.json +1 -1
  271. package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.json +2 -2
  272. package/artifacts/contracts/utils/ProtocolUpgrade.sol/OldMarketMaker.dbg.json +1 -1
  273. package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.dbg.json +1 -1
  274. package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.json +2 -2
  275. package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
  276. package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.json +2 -2
  277. package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
  278. package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.json +2 -2
  279. package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
  280. package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.json +2 -2
  281. package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.dbg.json +1 -1
  282. package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.json +2 -2
  283. package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.dbg.json +1 -1
  284. package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.json +2 -2
  285. package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.dbg.json +1 -1
  286. package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.json +2 -2
  287. package/contracts/invite/InvitesFuseV2.sol +3 -2
  288. package/contracts/mocks/DistributionBridgeMock.sol +42 -15
  289. package/contracts/mocks/DistributionHelperTest.sol +6 -2
  290. package/contracts/mocks/FeesFormularMock.sol +14 -14
  291. package/contracts/mocks/GasPriceMockOracle.sol +7 -1
  292. package/contracts/reserve/DistributionHelper.sol +147 -23
  293. package/contracts/reserve/GoodReserveCDai.sol +39 -47
  294. package/contracts/staking/GoodFundManager.sol +18 -37
  295. package/contracts/token/GoodDollar.sol +11 -16
  296. package/contracts/token/MultichainFeeFormula.sol +34 -0
  297. package/contracts/token/superfluid/ConstantFlowNFTs.sol +3 -0
  298. package/contracts/token/superfluid/ISuperGoodDollar.sol +4 -5
  299. package/contracts/token/superfluid/ISuperToken.sol +464 -0
  300. package/contracts/token/superfluid/SuperGoodDollar.sol +408 -376
  301. package/contracts/token/superfluid/SuperToken.sol +144 -144
  302. package/contracts/ubi/UBIScheme.sol +9 -5
  303. package/contracts/ubi/UBISchemeV2.sol +6 -0
  304. package/contracts/utils/AdminWallet.sol +2 -1
  305. package/contracts/utils/AdminWalletFuse.sol +2 -1
  306. package/contracts/utils/BuyAndBridgeHelper.sol +13 -13
  307. package/contracts/utils/MultiCall.sol +8 -10
  308. package/dist/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.json +2 -2
  309. package/dist/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +233 -190
  310. package/dist/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.json +2 -2
  311. package/dist/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.json +2 -2
  312. package/hardhat.config.ts +46 -15
  313. package/package.json +7 -7
  314. package/releases/deploy-settings.json +3 -1
  315. package/releases/deployment.json +6 -2
  316. package/scripts/analytics/faucetStats.ts +19 -15
  317. package/scripts/fv.ts +305 -0
  318. package/scripts/multichain-deploy/1_basicdao-deploy.ts +18 -9
  319. package/scripts/multichain-deploy/helpers.ts +204 -64
  320. package/scripts/proposals/gip-15.ts +427 -0
  321. package/scripts/upgrades/multichain-formula-upgrade.ts +140 -0
  322. package/scripts/upgrades/restoreFunds.ts +91 -0
  323. package/scripts/upgrades/superfluid-nft-celo-gas-token.ts +159 -0
  324. package/scripts/utils.ts +15 -0
  325. package/test/helpers.ts +73 -10
  326. package/test/reserve/DistributionHelper.test.ts +183 -218
  327. package/test/reserve/GoodReserveCDai.distribution.test.ts +21 -144
  328. package/test/reserve/GoodReserveCDai.test.ts +98 -302
  329. package/test/staking/StakingRewards.test.ts +324 -936
  330. package/test/token/CeloGasToken.test.ts +108 -0
  331. package/test/token/SuperGoodDollar.test.ts +15 -6
  332. package/test/utils/AdminWallet.test.ts +97 -38
  333. package/test/utils/BuyAndBridgeHelper.test.ts +9 -33
  334. package/truffle-config.js +24 -6
  335. package/types/ConstantInflowNFT.ts +969 -0
  336. package/types/ConstantOutflowNFT.ts +1031 -0
  337. package/types/DistributionBridgeMock.ts +203 -70
  338. package/types/DistributionHelper.ts +325 -30
  339. package/types/DistributionHelperTest.ts +325 -30
  340. package/types/DistributionHelperTestHelper.ts +355 -35
  341. package/types/FlowNFTBase.ts +887 -0
  342. package/types/GasPriceMockOracle.ts +29 -0
  343. package/types/GoodReserveCDai.ts +79 -20
  344. package/types/IConstantFlowAgreementV1.ts +1391 -0
  345. package/types/IConstantInflowNFT.ts +772 -0
  346. package/types/IConstantOutflowNFT.ts +834 -0
  347. package/types/IERC721.ts +487 -0
  348. package/types/IERC721Metadata.ts +538 -0
  349. package/types/IFlowNFTBase.ts +711 -0
  350. package/types/IInstantDistributionAgreementV1.ts +1183 -0
  351. package/types/ILayerZeroFeeEstimator.ts +136 -0
  352. package/types/IMessagePassingBridge.ts +774 -0
  353. package/types/ISETH.ts +2668 -0
  354. package/types/ISETHCustom.ts +161 -0
  355. package/types/ISuperGoodDollar.ts +277 -25
  356. package/types/ISuperToken.ts +202 -346
  357. package/types/ISuperfluid.ts +7 -2
  358. package/types/ISuperfluidGovernance.ts +40 -5
  359. package/types/MultichainFeeFormula.ts +130 -0
  360. package/types/SuperGoodDollar.ts +383 -349
  361. package/types/SuperToken.ts +319 -344
  362. package/types/UBIScheme.ts +36 -0
  363. package/types/UBISchemeV2.ts +36 -0
  364. package/types/factories/AaveMock__factory.ts +1 -1
  365. package/types/factories/AaveStakingFactory__factory.ts +1 -1
  366. package/types/factories/AaveUSDMockOracle__factory.ts +1 -1
  367. package/types/factories/AdminWalletFuse__factory.ts +1 -1
  368. package/types/factories/AdminWallet__factory.ts +1 -1
  369. package/types/factories/BancorFormula__factory.ts +1 -1
  370. package/types/factories/BaseShareFieldV2__factory.ts +1 -1
  371. package/types/factories/BaseShareField__factory.ts +1 -1
  372. package/types/factories/BatUSDMockOracle__factory.ts +1 -1
  373. package/types/factories/BuyAndBridgeHelper__factory.ts +1 -1
  374. package/types/factories/BuyGDCloneFactory__factory.ts +1 -1
  375. package/types/factories/BuyGDClone__factory.ts +1 -1
  376. package/types/factories/CBATMock__factory.ts +1 -1
  377. package/types/factories/CDAILowWorthMock__factory.ts +1 -1
  378. package/types/factories/CDAIMock__factory.ts +1 -1
  379. package/types/factories/CDAINonMintableMock__factory.ts +1 -1
  380. package/types/factories/CDecimalsMock__factory.ts +1 -1
  381. package/types/factories/CSDTMock__factory.ts +1 -1
  382. package/types/factories/CUSDCMock__factory.ts +1 -1
  383. package/types/factories/ClaimersDistribution__factory.ts +1 -1
  384. package/types/factories/CompUSDMockOracle__factory.ts +1 -1
  385. package/types/factories/CompoundStakingFactory__factory.ts +1 -1
  386. package/types/factories/CompoundVotingMachine__factory.ts +1 -1
  387. package/types/factories/ConstantInflowNFT__factory.ts +758 -0
  388. package/types/factories/ConstantOutflowNFT__factory.ts +817 -0
  389. package/types/factories/DAIMock__factory.ts +1 -1
  390. package/types/factories/DAOContract__factory.ts +1 -1
  391. package/types/factories/DAOUpgradeableContract__factory.ts +1 -1
  392. package/types/factories/DaiEthPriceMockOracle__factory.ts +1 -1
  393. package/types/factories/DecimalsMock__factory.ts +1 -1
  394. package/types/factories/DistributionBridgeMock__factory.ts +121 -16
  395. package/types/factories/DistributionHelperTestHelper__factory.ts +255 -17
  396. package/types/factories/DistributionHelperTest__factory.ts +241 -16
  397. package/types/factories/DistributionHelper__factory.ts +241 -16
  398. package/types/factories/DonationsStaking__factory.ts +1 -1
  399. package/types/factories/ERC1967Proxy__factory.ts +1 -1
  400. package/types/factories/ERC20PresetMinterPauserUpgradeable__factory.ts +1 -1
  401. package/types/factories/ERC20Upgradeable__factory.ts +1 -1
  402. package/types/factories/EthUSDMockOracle__factory.ts +1 -1
  403. package/types/factories/EventsEmitter__factory.ts +1 -1
  404. package/types/factories/ExchangeHelper__factory.ts +1 -1
  405. package/types/factories/Faucet__factory.ts +1 -1
  406. package/types/factories/FeesFormulaMock__factory.ts +1 -1
  407. package/types/factories/FlowNFTBase__factory.ts +642 -0
  408. package/types/factories/FuseFaucetV2__factory.ts +1 -1
  409. package/types/factories/FuseFaucet__factory.ts +1 -1
  410. package/types/factories/FuseStakingV3__factory.ts +1 -1
  411. package/types/factories/GDFaucet__factory.ts +1 -1
  412. package/types/factories/GReputation__factory.ts +1 -1
  413. package/types/factories/GasPriceMockOracle__factory.ts +14 -1
  414. package/types/factories/GoodAaveStakingV2__factory.ts +1 -1
  415. package/types/factories/GoodAaveStaking__factory.ts +1 -1
  416. package/types/factories/GoodCompoundStakingTest__factory.ts +1 -1
  417. package/types/factories/GoodCompoundStakingV2__factory.ts +1 -1
  418. package/types/factories/GoodCompoundStaking__factory.ts +1 -1
  419. package/types/factories/GoodDollarMintBurnWrapper__factory.ts +1 -1
  420. package/types/factories/GoodDollarStakingMock__factory.ts +1 -1
  421. package/types/factories/GoodDollarStaking__factory.ts +1 -1
  422. package/types/factories/GoodDollar__factory.ts +1 -1
  423. package/types/factories/GoodFundManagerTest__factory.ts +1 -1
  424. package/types/factories/GoodFundManager__factory.ts +1 -1
  425. package/types/factories/GoodMarketMaker__factory.ts +1 -1
  426. package/types/factories/GoodReserveCDai__factory.ts +44 -18
  427. package/types/factories/GovernanceStaking__factory.ts +1 -1
  428. package/types/factories/IConstantFlowAgreementV1__factory.ts +1064 -0
  429. package/types/factories/IConstantInflowNFT__factory.ts +551 -0
  430. package/types/factories/IConstantOutflowNFT__factory.ts +614 -0
  431. package/types/factories/IERC721Metadata__factory.ts +356 -0
  432. package/types/factories/IERC721__factory.ts +308 -0
  433. package/types/factories/IFlowNFTBase__factory.ts +512 -0
  434. package/types/factories/IInstantDistributionAgreementV1__factory.ts +1015 -0
  435. package/types/factories/ILayerZeroFeeEstimator__factory.ts +79 -0
  436. package/types/factories/IMessagePassingBridge__factory.ts +446 -0
  437. package/types/factories/ISETHCustom__factory.ts +56 -0
  438. package/types/factories/ISETH__factory.ts +1866 -0
  439. package/types/factories/ISuperGoodDollar__factory.ts +159 -5
  440. package/types/factories/ISuperTokenFactory__factory.ts +5 -0
  441. package/types/factories/ISuperToken__factory.ts +130 -191
  442. package/types/factories/ISuperfluidGovernance__factory.ts +23 -5
  443. package/types/factories/ISuperfluid__factory.ts +10 -0
  444. package/types/factories/IdentityFix__factory.ts +1 -1
  445. package/types/factories/IdentityMock__factory.ts +1 -1
  446. package/types/factories/IdentityV2__factory.ts +1 -1
  447. package/types/factories/IncentiveControllerMock__factory.ts +1 -1
  448. package/types/factories/InvitesFuseV2__factory.ts +1 -1
  449. package/types/factories/InvitesV1__factory.ts +1 -1
  450. package/types/factories/InvitesV2__factory.ts +1 -1
  451. package/types/factories/LendingPoolMock__factory.ts +1 -1
  452. package/types/factories/Multicall__factory.ts +1 -1
  453. package/types/factories/MultichainBridgeHelper__factory.ts +1 -1
  454. package/types/factories/MultichainFeeFormula__factory.ts +113 -0
  455. package/types/factories/MultichainRouterMock__factory.ts +1 -1
  456. package/types/factories/NameService__factory.ts +1 -1
  457. package/types/factories/OneTimePaymentsV2__factory.ts +1 -1
  458. package/types/factories/OneTimePayments__factory.ts +1 -1
  459. package/types/factories/OverMintTesterRegularStake__factory.ts +1 -1
  460. package/types/factories/OverMintTester__factory.ts +1 -1
  461. package/types/factories/PayableMock__factory.ts +1 -1
  462. package/types/factories/ProtocolUpgradeFuseRecover__factory.ts +1 -1
  463. package/types/factories/ProtocolUpgradeFuse__factory.ts +1 -1
  464. package/types/factories/ProtocolUpgradeRecover__factory.ts +1 -1
  465. package/types/factories/ProtocolUpgrade__factory.ts +1 -1
  466. package/types/factories/ProxyFactory1967__factory.ts +1 -1
  467. package/types/factories/ReputationTestHelper__factory.ts +1 -1
  468. package/types/factories/Reputation__factory.ts +1 -1
  469. package/types/factories/SixteenDecimalsTokenMock__factory.ts +1 -1
  470. package/types/factories/StakersDistribution__factory.ts +1 -1
  471. package/types/factories/StakingMockFixedAPY__factory.ts +1 -1
  472. package/types/factories/SuperGoodDollar__factory.ts +230 -187
  473. package/types/factories/SuperToken__factory.ts +197 -192
  474. package/types/factories/SwapHelperTest__factory.ts +1 -1
  475. package/types/factories/TwentyDecimalsTokenMock__factory.ts +1 -1
  476. package/types/factories/UBISchemeV2__factory.ts +19 -1
  477. package/types/factories/UBIScheme__factory.ts +19 -1
  478. package/types/factories/USDCMock__factory.ts +1 -1
  479. package/types/factories/UUPSProxy__factory.ts +1 -1
  480. package/types/factories/UniswapV2SwapHelper__factory.ts +1 -1
  481. package/types/factories/UpgradableMock2__factory.ts +1 -1
  482. package/types/factories/UpgradableMock3__factory.ts +1 -1
  483. package/types/factories/UpgradableMock4__factory.ts +1 -1
  484. package/types/factories/UpgradableMock__factory.ts +1 -1
  485. package/types/hardhat.d.ts +166 -4
  486. package/types/index.ts +34 -4
  487. package/yarn.lock +1288 -719
  488. package/artifacts/contracts/token/FeesFormula.sol/IFeesFormula.dbg.json +0 -4
  489. /package/contracts/token/{FeesFormula.sol → IFeesFormula.sol} +0 -0
@@ -0,0 +1,464 @@
1
+ // SPDX-License-Identifier: AGPLv3
2
+ pragma solidity >=0.8.4;
3
+
4
+ import { IERC20, IERC777, TokenInfo } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol";
5
+ import { ISuperfluidToken } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluidToken.sol";
6
+ import { IConstantOutflowNFT } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/IConstantOutflowNFT.sol";
7
+ import { IConstantInflowNFT } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/IConstantInflowNFT.sol";
8
+ import { IPoolAdminNFT } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/IPoolAdminNFT.sol";
9
+ import { IPoolMemberNFT } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/IPoolMemberNFT.sol";
10
+
11
+ /**
12
+ * @title Super token (Superfluid Token + ERC20 + ERC777) interface
13
+ * @author Superfluid
14
+ */
15
+ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
16
+ /**************************************************************************
17
+ * Errors
18
+ *************************************************************************/
19
+ error SUPER_TOKEN_CALLER_IS_NOT_OPERATOR_FOR_HOLDER(); // 0xf7f02227
20
+ error SUPER_TOKEN_NOT_ERC777_TOKENS_RECIPIENT(); // 0xfe737d05
21
+ error SUPER_TOKEN_INFLATIONARY_DEFLATIONARY_NOT_SUPPORTED(); // 0xe3e13698
22
+ error SUPER_TOKEN_NO_UNDERLYING_TOKEN(); // 0xf79cf656
23
+ error SUPER_TOKEN_ONLY_SELF(); // 0x7ffa6648
24
+ error SUPER_TOKEN_ONLY_HOST(); // 0x98f73704
25
+ error SUPER_TOKEN_ONLY_GOV_OWNER(); // 0xd9c7ed08
26
+ error SUPER_TOKEN_APPROVE_FROM_ZERO_ADDRESS(); // 0x81638627
27
+ error SUPER_TOKEN_APPROVE_TO_ZERO_ADDRESS(); // 0xdf070274
28
+ error SUPER_TOKEN_BURN_FROM_ZERO_ADDRESS(); // 0xba2ab184
29
+ error SUPER_TOKEN_MINT_TO_ZERO_ADDRESS(); // 0x0d243157
30
+ error SUPER_TOKEN_TRANSFER_FROM_ZERO_ADDRESS(); // 0xeecd6c9b
31
+ error SUPER_TOKEN_TRANSFER_TO_ZERO_ADDRESS(); // 0xe219bd39
32
+ error SUPER_TOKEN_NFT_PROXY_ALREADY_SET(); // 0x6bef249d
33
+
34
+ /**
35
+ * @dev Initialize the contract
36
+ */
37
+ function initialize(
38
+ IERC20 underlyingToken,
39
+ uint8 underlyingDecimals,
40
+ string calldata n,
41
+ string calldata s
42
+ ) external;
43
+
44
+ /**************************************************************************
45
+ * TokenInfo & ERC777
46
+ *************************************************************************/
47
+
48
+ /**
49
+ * @dev Returns the name of the token.
50
+ */
51
+ function name()
52
+ external
53
+ view
54
+ override(IERC777, TokenInfo)
55
+ returns (string memory);
56
+
57
+ /**
58
+ * @dev Returns the symbol of the token, usually a shorter version of the
59
+ * name.
60
+ */
61
+ function symbol()
62
+ external
63
+ view
64
+ override(IERC777, TokenInfo)
65
+ returns (string memory);
66
+
67
+ /**
68
+ * @dev Returns the number of decimals used to get its user representation.
69
+ * For example, if `decimals` equals `2`, a balance of `505` tokens should
70
+ * be displayed to a user as `5,05` (`505 / 10 ** 2`).
71
+ *
72
+ * Tokens usually opt for a value of 18, imitating the relationship between
73
+ * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
74
+ * called.
75
+ *
76
+ * @custom:note SuperToken always uses 18 decimals.
77
+ *
78
+ * This information is only used for _display_ purposes: it in
79
+ * no way affects any of the arithmetic of the contract, including
80
+ * {IERC20-balanceOf} and {IERC20-transfer}.
81
+ */
82
+ function decimals() external view override(TokenInfo) returns (uint8);
83
+
84
+ /**************************************************************************
85
+ * ERC20 & ERC777
86
+ *************************************************************************/
87
+
88
+ /**
89
+ * @dev See {IERC20-totalSupply}.
90
+ */
91
+ function totalSupply()
92
+ external
93
+ view
94
+ override(IERC777, IERC20)
95
+ returns (uint256);
96
+
97
+ /**
98
+ * @dev Returns the amount of tokens owned by an account (`owner`).
99
+ */
100
+ function balanceOf(
101
+ address account
102
+ ) external view override(IERC777, IERC20) returns (uint256 balance);
103
+
104
+ /**************************************************************************
105
+ * ERC20
106
+ *************************************************************************/
107
+
108
+ /**
109
+ * @dev Moves `amount` tokens from the caller's account to `recipient`.
110
+ *
111
+ * @return Returns Success a boolean value indicating whether the operation succeeded.
112
+ *
113
+ * @custom:emits a {Transfer} event.
114
+ */
115
+ function transfer(
116
+ address recipient,
117
+ uint256 amount
118
+ ) external override(IERC20) returns (bool);
119
+
120
+ /**
121
+ * @dev Returns the remaining number of tokens that `spender` will be
122
+ * allowed to spend on behalf of `owner` through {transferFrom}. This is
123
+ * zero by default.
124
+ *
125
+ * @notice This value changes when {approve} or {transferFrom} are called.
126
+ */
127
+ function allowance(
128
+ address owner,
129
+ address spender
130
+ ) external view override(IERC20) returns (uint256);
131
+
132
+ /**
133
+ * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
134
+ *
135
+ * @return Returns Success a boolean value indicating whether the operation succeeded.
136
+ *
137
+ * @custom:note Beware that changing an allowance with this method brings the risk
138
+ * that someone may use both the old and the new allowance by unfortunate
139
+ * transaction ordering. One possible solution to mitigate this race
140
+ * condition is to first reduce the spender's allowance to 0 and set the
141
+ * desired value afterwards:
142
+ * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
143
+ *
144
+ * @custom:emits an {Approval} event.
145
+ */
146
+ function approve(
147
+ address spender,
148
+ uint256 amount
149
+ ) external override(IERC20) returns (bool);
150
+
151
+ /**
152
+ * @dev Moves `amount` tokens from `sender` to `recipient` using the
153
+ * allowance mechanism. `amount` is then deducted from the caller's
154
+ * allowance.
155
+ *
156
+ * @return Returns Success a boolean value indicating whether the operation succeeded.
157
+ *
158
+ * @custom:emits a {Transfer} event.
159
+ */
160
+ function transferFrom(
161
+ address sender,
162
+ address recipient,
163
+ uint256 amount
164
+ ) external override(IERC20) returns (bool);
165
+
166
+ /**
167
+ * @dev Atomically increases the allowance granted to `spender` by the caller.
168
+ *
169
+ * This is an alternative to {approve} that can be used as a mitigation for
170
+ * problems described in {IERC20-approve}.
171
+ *
172
+ * @custom:emits an {Approval} event indicating the updated allowance.
173
+ *
174
+ * @custom:requirements
175
+ * - `spender` cannot be the zero address.
176
+ */
177
+ function increaseAllowance(
178
+ address spender,
179
+ uint256 addedValue
180
+ ) external returns (bool);
181
+
182
+ /**
183
+ * @dev Atomically decreases the allowance granted to `spender` by the caller.
184
+ *
185
+ * This is an alternative to {approve} that can be used as a mitigation for
186
+ * problems described in {IERC20-approve}.
187
+ *
188
+ * @custom:emits an {Approval} event indicating the updated allowance.
189
+ *
190
+ * @custom:requirements
191
+ * - `spender` cannot be the zero address.
192
+ * - `spender` must have allowance for the caller of at least
193
+ * `subtractedValue`.
194
+ */
195
+ function decreaseAllowance(
196
+ address spender,
197
+ uint256 subtractedValue
198
+ ) external returns (bool);
199
+
200
+ /**************************************************************************
201
+ * ERC777
202
+ *************************************************************************/
203
+
204
+ /**
205
+ * @dev Returns the smallest part of the token that is not divisible. This
206
+ * means all token operations (creation, movement and destruction) must have
207
+ * amounts that are a multiple of this number.
208
+ *
209
+ * @custom:note For super token contracts, this value is always 1
210
+ */
211
+ function granularity() external view override(IERC777) returns (uint256);
212
+
213
+ /**
214
+ * @dev Moves `amount` tokens from the caller's account to `recipient`.
215
+ *
216
+ * @dev If send or receive hooks are registered for the caller and `recipient`,
217
+ * the corresponding functions will be called with `data` and empty
218
+ * `operatorData`. See {IERC777Sender} and {IERC777Recipient}.
219
+ *
220
+ * @custom:emits a {Sent} event.
221
+ *
222
+ * @custom:requirements
223
+ * - the caller must have at least `amount` tokens.
224
+ * - `recipient` cannot be the zero address.
225
+ * - if `recipient` is a contract, it must implement the {IERC777Recipient}
226
+ * interface.
227
+ */
228
+ function send(
229
+ address recipient,
230
+ uint256 amount,
231
+ bytes calldata data
232
+ ) external override(IERC777);
233
+
234
+ /**
235
+ * @dev Destroys `amount` tokens from the caller's account, reducing the
236
+ * total supply and transfers the underlying token to the caller's account.
237
+ *
238
+ * If a send hook is registered for the caller, the corresponding function
239
+ * will be called with `data` and empty `operatorData`. See {IERC777Sender}.
240
+ *
241
+ * @custom:emits a {Burned} event.
242
+ *
243
+ * @custom:requirements
244
+ * - the caller must have at least `amount` tokens.
245
+ */
246
+ function burn(uint256 amount, bytes calldata data) external override(IERC777);
247
+
248
+ /**
249
+ * @dev Returns true if an account is an operator of `tokenHolder`.
250
+ * Operators can send and burn tokens on behalf of their owners. All
251
+ * accounts are their own operator.
252
+ *
253
+ * See {operatorSend} and {operatorBurn}.
254
+ */
255
+ function isOperatorFor(
256
+ address operator,
257
+ address tokenHolder
258
+ ) external view override(IERC777) returns (bool);
259
+
260
+ /**
261
+ * @dev Make an account an operator of the caller.
262
+ *
263
+ * See {isOperatorFor}.
264
+ *
265
+ * @custom:emits an {AuthorizedOperator} event.
266
+ *
267
+ * @custom:requirements
268
+ * - `operator` cannot be calling address.
269
+ */
270
+ function authorizeOperator(address operator) external override(IERC777);
271
+
272
+ /**
273
+ * @dev Revoke an account's operator status for the caller.
274
+ *
275
+ * See {isOperatorFor} and {defaultOperators}.
276
+ *
277
+ * @custom:emits a {RevokedOperator} event.
278
+ *
279
+ * @custom:requirements
280
+ * - `operator` cannot be calling address.
281
+ */
282
+ function revokeOperator(address operator) external override(IERC777);
283
+
284
+ /**
285
+ * @dev Returns the list of default operators. These accounts are operators
286
+ * for all token holders, even if {authorizeOperator} was never called on
287
+ * them.
288
+ *
289
+ * This list is immutable, but individual holders may revoke these via
290
+ * {revokeOperator}, in which case {isOperatorFor} will return false.
291
+ */
292
+ function defaultOperators()
293
+ external
294
+ view
295
+ override(IERC777)
296
+ returns (address[] memory);
297
+
298
+ /**
299
+ * @dev Moves `amount` tokens from `sender` to `recipient`. The caller must
300
+ * be an operator of `sender`.
301
+ *
302
+ * If send or receive hooks are registered for `sender` and `recipient`,
303
+ * the corresponding functions will be called with `data` and
304
+ * `operatorData`. See {IERC777Sender} and {IERC777Recipient}.
305
+ *
306
+ * @custom:emits a {Sent} event.
307
+ *
308
+ * @custom:requirements
309
+ * - `sender` cannot be the zero address.
310
+ * - `sender` must have at least `amount` tokens.
311
+ * - the caller must be an operator for `sender`.
312
+ * - `recipient` cannot be the zero address.
313
+ * - if `recipient` is a contract, it must implement the {IERC777Recipient}
314
+ * interface.
315
+ */
316
+ function operatorSend(
317
+ address sender,
318
+ address recipient,
319
+ uint256 amount,
320
+ bytes calldata data,
321
+ bytes calldata operatorData
322
+ ) external override(IERC777);
323
+
324
+ /**
325
+ * @dev Destroys `amount` tokens from `account`, reducing the total supply.
326
+ * The caller must be an operator of `account`.
327
+ *
328
+ * If a send hook is registered for `account`, the corresponding function
329
+ * will be called with `data` and `operatorData`. See {IERC777Sender}.
330
+ *
331
+ * @custom:emits a {Burned} event.
332
+ *
333
+ * @custom:requirements
334
+ * - `account` cannot be the zero address.
335
+ * - `account` must have at least `amount` tokens.
336
+ * - the caller must be an operator for `account`.
337
+ */
338
+ function operatorBurn(
339
+ address account,
340
+ uint256 amount,
341
+ bytes calldata data,
342
+ bytes calldata operatorData
343
+ ) external override(IERC777);
344
+
345
+ /**************************************************************************
346
+ * SuperToken custom token functions
347
+ *************************************************************************/
348
+
349
+ /**
350
+ * @dev Give `spender`, `amount` allowance to spend the tokens of
351
+ * `account`.
352
+ *
353
+ * @custom:modifiers
354
+ * - onlySelf
355
+ */
356
+ function selfApproveFor(
357
+ address account,
358
+ address spender,
359
+ uint256 amount
360
+ ) external;
361
+
362
+ /**************************************************************************
363
+ * Batch Operations
364
+ *************************************************************************/
365
+
366
+ /**
367
+ * @dev Perform ERC20 approve by host contract.
368
+ * @param account The account owner to be approved.
369
+ * @param spender The spender of account owner's funds.
370
+ * @param amount Number of tokens to be approved.
371
+ *
372
+ * @custom:modifiers
373
+ * - onlyHost
374
+ */
375
+ function operationApprove(
376
+ address account,
377
+ address spender,
378
+ uint256 amount
379
+ ) external;
380
+
381
+ function operationIncreaseAllowance(
382
+ address account,
383
+ address spender,
384
+ uint256 addedValue
385
+ ) external;
386
+
387
+ function operationDecreaseAllowance(
388
+ address account,
389
+ address spender,
390
+ uint256 subtractedValue
391
+ ) external;
392
+
393
+ /**
394
+ * @dev Perform ERC20 transferFrom by host contract.
395
+ * @param account The account to spend sender's funds.
396
+ * @param spender The account where the funds is sent from.
397
+ * @param recipient The recipient of the funds.
398
+ * @param amount Number of tokens to be transferred.
399
+ *
400
+ * @custom:modifiers
401
+ * - onlyHost
402
+ */
403
+ function operationTransferFrom(
404
+ address account,
405
+ address spender,
406
+ address recipient,
407
+ uint256 amount
408
+ ) external;
409
+
410
+ /**
411
+ * @dev Perform ERC777 send by host contract.
412
+ * @param spender The account where the funds is sent from.
413
+ * @param recipient The recipient of the funds.
414
+ * @param amount Number of tokens to be transferred.
415
+ * @param data Arbitrary user inputted data
416
+ *
417
+ * @custom:modifiers
418
+ * - onlyHost
419
+ */
420
+ function operationSend(
421
+ address spender,
422
+ address recipient,
423
+ uint256 amount,
424
+ bytes memory data
425
+ ) external;
426
+
427
+ /**************************************************************************
428
+ * ERC20x-specific Functions
429
+ *************************************************************************/
430
+
431
+ function constantOutflowNFT() external view returns (IConstantOutflowNFT);
432
+
433
+ function constantInflowNFT() external view returns (IConstantInflowNFT);
434
+
435
+ function poolAdminNFT() external view returns (IPoolAdminNFT);
436
+
437
+ function poolMemberNFT() external view returns (IPoolMemberNFT);
438
+
439
+ /**
440
+ * @dev Constant Outflow NFT proxy created event
441
+ * @param constantOutflowNFT constant outflow nft address
442
+ */
443
+ event ConstantOutflowNFTCreated(
444
+ IConstantOutflowNFT indexed constantOutflowNFT
445
+ );
446
+
447
+ /**
448
+ * @dev Constant Inflow NFT proxy created event
449
+ * @param constantInflowNFT constant inflow nft address
450
+ */
451
+ event ConstantInflowNFTCreated(IConstantInflowNFT indexed constantInflowNFT);
452
+
453
+ /**************************************************************************
454
+ * Function modifiers for access control and parameter validations
455
+ *
456
+ * While they cannot be explicitly stated in function definitions, they are
457
+ * listed in function definition comments instead for clarity.
458
+ *
459
+ * NOTE: solidity-coverage not supporting it
460
+ *************************************************************************/
461
+
462
+ /// @dev The msg.sender must be the contract it\
463
+ //modifier onlySelf() virtual
464
+ }