@gooddollar/goodprotocol 2.0.5-beta.5 → 2.0.5-beta.6

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 (297) hide show
  1. package/artifacts/abis/IFirstClaimPool.min.json +1 -1
  2. package/artifacts/contracts/DAOStackInterfaces.sol/Avatar.dbg.json +1 -1
  3. package/artifacts/contracts/DAOStackInterfaces.sol/Controller.dbg.json +1 -1
  4. package/artifacts/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface.dbg.json +1 -1
  5. package/artifacts/contracts/DAOStackInterfaces.sol/IntVoteInterface.dbg.json +1 -1
  6. package/artifacts/contracts/DAOStackInterfaces.sol/ReputationInterface.dbg.json +1 -1
  7. package/artifacts/contracts/DAOStackInterfaces.sol/SchemeRegistrar.dbg.json +1 -1
  8. package/artifacts/contracts/Interfaces.sol/AggregatorV3Interface.dbg.json +1 -1
  9. package/artifacts/contracts/Interfaces.sol/ERC20.dbg.json +1 -1
  10. package/artifacts/contracts/Interfaces.sol/IAaveIncentivesController.dbg.json +1 -1
  11. package/artifacts/contracts/Interfaces.sol/IAdminWallet.dbg.json +1 -1
  12. package/artifacts/contracts/Interfaces.sol/IDonationStaking.dbg.json +1 -1
  13. package/artifacts/contracts/Interfaces.sol/IERC2917.dbg.json +1 -1
  14. package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.dbg.json +1 -1
  15. package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.json +7 -0
  16. package/artifacts/contracts/Interfaces.sol/IGoodDollar.dbg.json +1 -1
  17. package/artifacts/contracts/Interfaces.sol/IGoodStaking.dbg.json +1 -1
  18. package/artifacts/contracts/Interfaces.sol/IHasRouter.dbg.json +1 -1
  19. package/artifacts/contracts/Interfaces.sol/IIdentity.dbg.json +1 -1
  20. package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +1 -1
  21. package/artifacts/contracts/Interfaces.sol/ILendingPool.dbg.json +1 -1
  22. package/artifacts/contracts/Interfaces.sol/IMultichainRouter.dbg.json +1 -1
  23. package/artifacts/contracts/Interfaces.sol/INameService.dbg.json +1 -1
  24. package/artifacts/contracts/Interfaces.sol/IUBIScheme.dbg.json +1 -1
  25. package/artifacts/contracts/Interfaces.sol/ProxyAdmin.dbg.json +1 -1
  26. package/artifacts/contracts/Interfaces.sol/Reserve.dbg.json +1 -1
  27. package/artifacts/contracts/Interfaces.sol/Staking.dbg.json +1 -1
  28. package/artifacts/contracts/Interfaces.sol/Uniswap.dbg.json +1 -1
  29. package/artifacts/contracts/Interfaces.sol/UniswapFactory.dbg.json +1 -1
  30. package/artifacts/contracts/Interfaces.sol/UniswapPair.dbg.json +1 -1
  31. package/artifacts/contracts/Interfaces.sol/cERC20.dbg.json +1 -1
  32. package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
  33. package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.json +2 -2
  34. package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
  35. package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.json +2 -2
  36. package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.dbg.json +1 -1
  37. package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.json +2 -2
  38. package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
  39. package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.json +2 -2
  40. package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
  41. package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.json +2 -2
  42. package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
  43. package/artifacts/contracts/governance/GReputation.sol/GReputation.json +2 -2
  44. package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.dbg.json +1 -1
  45. package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.json +2 -2
  46. package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +1 -1
  47. package/artifacts/contracts/governance/GoodDollarStaking.sol/IStakingUpgrade.dbg.json +1 -1
  48. package/artifacts/contracts/governance/GoodDollarStaking.sol/RewardsMinter.dbg.json +1 -1
  49. package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
  50. package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.json +2 -2
  51. package/artifacts/contracts/governance/MultiBaseGovernanceShareField.sol/MultiBaseGovernanceShareField.dbg.json +1 -1
  52. package/artifacts/contracts/governance/Reputation.sol/Reputation.dbg.json +1 -1
  53. package/artifacts/contracts/governance/Reputation.sol/Reputation.json +2 -2
  54. package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
  55. package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.json +2 -2
  56. package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
  57. package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.json +2 -2
  58. package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
  59. package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.json +2 -2
  60. package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
  61. package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.json +2 -2
  62. package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +1 -1
  63. package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.json +2 -2
  64. package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
  65. package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
  66. package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
  67. package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
  68. package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
  69. package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
  70. package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
  71. package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.dbg.json +1 -1
  72. package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.json +2 -2
  73. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
  74. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.json +2 -2
  75. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
  76. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.json +2 -2
  77. package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.dbg.json +1 -1
  78. package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
  79. package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
  80. package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
  81. package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.json +2 -2
  82. package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
  83. package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.json +2 -2
  84. package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
  85. package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.json +2 -2
  86. package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.dbg.json +1 -1
  87. package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.json +2 -2
  88. package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.dbg.json +1 -1
  89. package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
  90. package/artifacts/contracts/mocks/MultichainRouterMock.sol/IWrapper.dbg.json +1 -1
  91. package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.dbg.json +1 -1
  92. package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.json +2 -2
  93. package/artifacts/contracts/mocks/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
  94. package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
  95. package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.json +2 -2
  96. package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
  97. package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.json +2 -2
  98. package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.dbg.json +1 -1
  99. package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
  100. package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
  101. package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
  102. package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.json +2 -2
  103. package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
  104. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
  105. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.json +2 -2
  106. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
  107. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.json +2 -2
  108. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
  109. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.json +2 -2
  110. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
  111. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.json +2 -2
  112. package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
  113. package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
  114. package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
  115. package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
  116. package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
  117. package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
  118. package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
  119. package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
  120. package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
  121. package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.json +2 -2
  122. package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.dbg.json +1 -1
  123. package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.json +2 -2
  124. package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.dbg.json +1 -1
  125. package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.json +2 -2
  126. package/artifacts/contracts/reserve/GoodReserveCDai.sol/ContributionCalc.dbg.json +1 -1
  127. package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.dbg.json +1 -1
  128. package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.json +2 -2
  129. package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
  130. package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.json +2 -2
  131. package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
  132. package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.json +2 -2
  133. package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.dbg.json +1 -1
  134. package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.json +2 -2
  135. package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.dbg.json +1 -1
  136. package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.json +2 -2
  137. package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.dbg.json +1 -1
  138. package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.dbg.json +1 -1
  139. package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.dbg.json +1 -1
  140. package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.json +2 -2
  141. package/artifacts/contracts/staking/SimpleStaking.sol/SimpleStaking.dbg.json +1 -1
  142. package/artifacts/contracts/staking/SimpleStakingV2.sol/SimpleStakingV2.dbg.json +1 -1
  143. package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.dbg.json +1 -1
  144. package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.json +2 -2
  145. package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.dbg.json +1 -1
  146. package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.json +2 -2
  147. package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
  148. package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.json +2 -2
  149. package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
  150. package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.json +2 -2
  151. package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
  152. package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.json +2 -2
  153. package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
  154. package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.json +2 -2
  155. package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
  156. package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.json +2 -2
  157. package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.dbg.json +1 -1
  158. package/artifacts/contracts/staking/utils/StakingRewardsFixedAPY.sol/StakingRewardsFixedAPY.dbg.json +1 -1
  159. package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.dbg.json +1 -1
  160. package/artifacts/contracts/token/ERC677.sol/ERC677.dbg.json +1 -1
  161. package/artifacts/contracts/token/ERC677.sol/ERC677Receiver.dbg.json +1 -1
  162. package/artifacts/contracts/token/FeesFormula.sol/IFeesFormula.dbg.json +1 -1
  163. package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.dbg.json +1 -1
  164. package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.json +2 -2
  165. package/artifacts/contracts/token/superfluid/ERC20Permit.sol/ERC20Permit.dbg.json +1 -1
  166. package/artifacts/contracts/token/superfluid/ERC20Permit.sol/SelfApprove.dbg.json +1 -1
  167. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/IGoodDollarCustom.dbg.json +1 -1
  168. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/ISuperGoodDollar.dbg.json +1 -1
  169. package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
  170. package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +2 -2
  171. package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
  172. package/artifacts/contracts/token/superfluid/SuperfluidToken.sol/SuperfluidToken.dbg.json +1 -1
  173. package/artifacts/contracts/token/superfluid/UUPSProxiable.sol/UUPSProxiable.dbg.json +1 -1
  174. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/Proxy.dbg.json +1 -1
  175. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.dbg.json +1 -1
  176. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.json +2 -2
  177. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.dbg.json +1 -1
  178. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.json +2 -2
  179. package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.dbg.json +1 -1
  180. package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.json +2 -2
  181. package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
  182. package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.json +2 -2
  183. package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
  184. package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.json +2 -2
  185. package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.dbg.json +1 -1
  186. package/artifacts/contracts/utils/BulkProof.sol/BulkProof.dbg.json +1 -1
  187. package/artifacts/contracts/utils/BulkProof.sol/BulkProof.json +2 -2
  188. package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.dbg.json +1 -1
  189. package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.json +2 -2
  190. package/artifacts/contracts/utils/DAOContract.sol/DAOContract.dbg.json +1 -1
  191. package/artifacts/contracts/utils/DAOContract.sol/DAOContract.json +2 -2
  192. package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
  193. package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.json +2 -2
  194. package/artifacts/contracts/utils/DSMath.sol/DSMath.dbg.json +1 -1
  195. package/artifacts/contracts/utils/DataTypes.sol/DataTypes.dbg.json +1 -1
  196. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
  197. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.json +2 -2
  198. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/IRouter.dbg.json +1 -1
  199. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/PausableControl.dbg.json +1 -1
  200. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.dbg.json +1 -1
  201. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.json +2 -2
  202. package/artifacts/contracts/utils/MultiCall.sol/Multicall.dbg.json +1 -1
  203. package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.dbg.json +1 -1
  204. package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.json +2 -2
  205. package/artifacts/contracts/utils/NameService.sol/NameService.dbg.json +1 -1
  206. package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.dbg.json +1 -1
  207. package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.json +2 -2
  208. package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.dbg.json +1 -1
  209. package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.json +2 -2
  210. package/artifacts/contracts/utils/ProtocolUpgrade.sol/OldMarketMaker.dbg.json +1 -1
  211. package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.dbg.json +1 -1
  212. package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.json +2 -2
  213. package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
  214. package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.json +2 -2
  215. package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
  216. package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.json +2 -2
  217. package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
  218. package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.json +2 -2
  219. package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.dbg.json +1 -1
  220. package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.dbg.json +1 -1
  221. package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.dbg.json +1 -1
  222. package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.json +2 -2
  223. package/contracts/Interfaces.sol +46 -61
  224. package/contracts/invite/InvitesFuseV2.sol +1 -1
  225. package/contracts/invite/InvitesV2.sol +20 -30
  226. package/contracts/token/superfluid/UUPSProxy.sol +1 -1
  227. package/package.json +2 -2
  228. package/releases/deployment.json +4 -2
  229. package/scripts/multichain-deploy/helpers.ts +13 -2
  230. package/scripts/proposals/gip-14_1.ts +255 -0
  231. package/scripts/proposals/gips-14_1.md +29 -0
  232. package/types/IFirstClaimPool.ts +21 -0
  233. package/types/factories/AaveStakingFactory__factory.ts +1 -1
  234. package/types/factories/AdminWalletFuse__factory.ts +1 -1
  235. package/types/factories/AdminWallet__factory.ts +1 -1
  236. package/types/factories/BaseShareFieldV2__factory.ts +1 -1
  237. package/types/factories/BaseShareField__factory.ts +1 -1
  238. package/types/factories/BuyAndBridgeHelper__factory.ts +1 -1
  239. package/types/factories/ClaimersDistribution__factory.ts +1 -1
  240. package/types/factories/CompoundStakingFactory__factory.ts +1 -1
  241. package/types/factories/CompoundVotingMachine__factory.ts +1 -1
  242. package/types/factories/DAOContract__factory.ts +1 -1
  243. package/types/factories/DAOUpgradeableContract__factory.ts +1 -1
  244. package/types/factories/DistributionBridgeMock__factory.ts +1 -1
  245. package/types/factories/DistributionHelperTestHelper__factory.ts +1 -1
  246. package/types/factories/DistributionHelperTest__factory.ts +1 -1
  247. package/types/factories/DistributionHelper__factory.ts +1 -1
  248. package/types/factories/DonationsStaking__factory.ts +1 -1
  249. package/types/factories/ExchangeHelper__factory.ts +1 -1
  250. package/types/factories/Faucet__factory.ts +1 -1
  251. package/types/factories/FuseFaucetV2__factory.ts +1 -1
  252. package/types/factories/FuseFaucet__factory.ts +1 -1
  253. package/types/factories/FuseStakingV3__factory.ts +1 -1
  254. package/types/factories/GReputation__factory.ts +1 -1
  255. package/types/factories/GoodAaveStakingV2__factory.ts +1 -1
  256. package/types/factories/GoodAaveStaking__factory.ts +1 -1
  257. package/types/factories/GoodCompoundStakingTest__factory.ts +1 -1
  258. package/types/factories/GoodCompoundStakingV2__factory.ts +1 -1
  259. package/types/factories/GoodCompoundStaking__factory.ts +1 -1
  260. package/types/factories/GoodDollarMintBurnWrapper__factory.ts +1 -1
  261. package/types/factories/GoodDollarStakingMock__factory.ts +1 -1
  262. package/types/factories/GoodDollarStaking__factory.ts +1 -1
  263. package/types/factories/GoodDollar__factory.ts +1 -1
  264. package/types/factories/GoodFundManagerTest__factory.ts +1 -1
  265. package/types/factories/GoodFundManager__factory.ts +1 -1
  266. package/types/factories/GoodMarketMaker__factory.ts +1 -1
  267. package/types/factories/GoodReserveCDai__factory.ts +1 -1
  268. package/types/factories/GovernanceStaking__factory.ts +1 -1
  269. package/types/factories/IFirstClaimPool__factory.ts +7 -0
  270. package/types/factories/IdentityMock__factory.ts +1 -1
  271. package/types/factories/IdentityV2__factory.ts +1 -1
  272. package/types/factories/InvitesFuseV2__factory.ts +1 -1
  273. package/types/factories/InvitesV1__factory.ts +1 -1
  274. package/types/factories/InvitesV2__factory.ts +1 -1
  275. package/types/factories/MultichainBridgeHelper__factory.ts +1 -1
  276. package/types/factories/MultichainRouterMock__factory.ts +1 -1
  277. package/types/factories/OneTimePaymentsV2__factory.ts +1 -1
  278. package/types/factories/OneTimePayments__factory.ts +1 -1
  279. package/types/factories/OverMintTesterRegularStake__factory.ts +1 -1
  280. package/types/factories/OverMintTester__factory.ts +1 -1
  281. package/types/factories/ProtocolUpgradeFuseRecover__factory.ts +1 -1
  282. package/types/factories/ProtocolUpgradeFuse__factory.ts +1 -1
  283. package/types/factories/ProtocolUpgradeRecover__factory.ts +1 -1
  284. package/types/factories/ProtocolUpgrade__factory.ts +1 -1
  285. package/types/factories/ReputationTestHelper__factory.ts +1 -1
  286. package/types/factories/Reputation__factory.ts +1 -1
  287. package/types/factories/StakersDistribution__factory.ts +1 -1
  288. package/types/factories/SuperGoodDollar__factory.ts +1 -1
  289. package/types/factories/SwapHelperTest__factory.ts +1 -1
  290. package/types/factories/UBIScheme__factory.ts +1 -1
  291. package/types/factories/UUPSProxy__factory.ts +1 -1
  292. package/types/factories/UniswapV2SwapHelper__factory.ts +1 -1
  293. package/types/factories/UpgradableMock2__factory.ts +1 -1
  294. package/types/factories/UpgradableMock3__factory.ts +1 -1
  295. package/types/factories/UpgradableMock4__factory.ts +1 -1
  296. package/types/factories/UpgradableMock__factory.ts +1 -1
  297. package/yarn.lock +4 -4
@@ -74,8 +74,8 @@
74
74
  "type": "function"
75
75
  }
76
76
  ],
77
- "bytecode": "0x608060405234801561001057600080fd5b5060405161033c38038061033c83398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b6102a9806100936000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80635653eeeb1461004657806391d61f3e1461005b578063c52164c61461006e575b600080fd5b6100596100543660046101c9565b61009d565b005b6100596100693660046101c9565b610136565b600054610081906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b60005b81811015610130576000546040516340c10f1960e01b81526001600160a01b03909116906340c10f19906100da908790879060040161020a565b6020604051808303816000875af11580156100f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061011d9190610223565b50806101288161024c565b9150506100a0565b50505050565b60005b8181101561013057600054604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90610173908790879060040161020a565b6020604051808303816000875af1158015610192573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b69190610223565b50806101c18161024c565b915050610139565b6000806000606084860312156101de57600080fd5b83356001600160a01b03811681146101f557600080fd5b95602085013595506040909401359392505050565b6001600160a01b03929092168252602082015260400190565b60006020828403121561023557600080fd5b8151801515811461024557600080fd5b9392505050565b60006001820161026c57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220991cc50bfd4afa043c3f835b990e1e7516ce1f40e33547fc4835375457850ac164736f6c63430008100033",
78
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80635653eeeb1461004657806391d61f3e1461005b578063c52164c61461006e575b600080fd5b6100596100543660046101c9565b61009d565b005b6100596100693660046101c9565b610136565b600054610081906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b60005b81811015610130576000546040516340c10f1960e01b81526001600160a01b03909116906340c10f19906100da908790879060040161020a565b6020604051808303816000875af11580156100f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061011d9190610223565b50806101288161024c565b9150506100a0565b50505050565b60005b8181101561013057600054604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90610173908790879060040161020a565b6020604051808303816000875af1158015610192573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b69190610223565b50806101c18161024c565b915050610139565b6000806000606084860312156101de57600080fd5b83356001600160a01b03811681146101f557600080fd5b95602085013595506040909401359392505050565b6001600160a01b03929092168252602082015260400190565b60006020828403121561023557600080fd5b8151801515811461024557600080fd5b9392505050565b60006001820161026c57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220991cc50bfd4afa043c3f835b990e1e7516ce1f40e33547fc4835375457850ac164736f6c63430008100033",
77
+ "bytecode": "0x608060405234801561001057600080fd5b5060405161033c38038061033c83398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b6102a9806100936000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80635653eeeb1461004657806391d61f3e1461005b578063c52164c61461006e575b600080fd5b6100596100543660046101c9565b61009d565b005b6100596100693660046101c9565b610136565b600054610081906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b60005b81811015610130576000546040516340c10f1960e01b81526001600160a01b03909116906340c10f19906100da908790879060040161020a565b6020604051808303816000875af11580156100f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061011d9190610223565b50806101288161024c565b9150506100a0565b50505050565b60005b8181101561013057600054604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90610173908790879060040161020a565b6020604051808303816000875af1158015610192573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b69190610223565b50806101c18161024c565b915050610139565b6000806000606084860312156101de57600080fd5b83356001600160a01b03811681146101f557600080fd5b95602085013595506040909401359392505050565b6001600160a01b03929092168252602082015260400190565b60006020828403121561023557600080fd5b8151801515811461024557600080fd5b9392505050565b60006001820161026c57634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212206c73c2a622a13a1420388daec412af012e94d78e840b29507bd279ce90dd324d64736f6c63430008100033",
78
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80635653eeeb1461004657806391d61f3e1461005b578063c52164c61461006e575b600080fd5b6100596100543660046101c9565b61009d565b005b6100596100693660046101c9565b610136565b600054610081906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b60005b81811015610130576000546040516340c10f1960e01b81526001600160a01b03909116906340c10f19906100da908790879060040161020a565b6020604051808303816000875af11580156100f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061011d9190610223565b50806101288161024c565b9150506100a0565b50505050565b60005b8181101561013057600054604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90610173908790879060040161020a565b6020604051808303816000875af1158015610192573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b69190610223565b50806101c18161024c565b915050610139565b6000806000606084860312156101de57600080fd5b83356001600160a01b03811681146101f557600080fd5b95602085013595506040909401359392505050565b6001600160a01b03929092168252602082015260400190565b60006020828403121561023557600080fd5b8151801515811461024557600080fd5b9392505050565b60006001820161026c57634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212206c73c2a622a13a1420388daec412af012e94d78e840b29507bd279ce90dd324d64736f6c63430008100033",
79
79
  "linkReferences": {},
80
80
  "deployedLinkReferences": {}
81
81
  }
@@ -19,10 +19,10 @@ interface ERC20 {
19
19
 
20
20
  function totalSupply() external view returns (uint256);
21
21
 
22
- function allowance(address owner, address spender)
23
- external
24
- view
25
- returns (uint256);
22
+ function allowance(
23
+ address owner,
24
+ address spender
25
+ ) external view returns (uint256);
26
26
 
27
27
  function transferFrom(
28
28
  address sender,
@@ -136,24 +136,25 @@ interface IERC2917 is ERC20 {
136
136
  /// @notice It will get the productivity of given user.
137
137
  /// @dev it will return 0 if user has no productivity proved in the contract.
138
138
  /// @return user's productivity and overall productivity.
139
- function getProductivity(address user)
140
- external
141
- view
142
- returns (uint256, uint256);
139
+ function getProductivity(
140
+ address user
141
+ ) external view returns (uint256, uint256);
143
142
 
144
143
  /// @notice increase a user's productivity.
145
144
  /// @dev Note the best practice will be restrict the callee to prove of productivity's contract address.
146
145
  /// @return true to confirm that the productivity added success.
147
- function increaseProductivity(address user, uint256 value)
148
- external
149
- returns (bool);
146
+ function increaseProductivity(
147
+ address user,
148
+ uint256 value
149
+ ) external returns (bool);
150
150
 
151
151
  /// @notice decrease a user's productivity.
152
152
  /// @dev Note the best practice will be restrict the callee to prove of productivity's contract address.
153
153
  /// @return true to confirm that the productivity removed success.
154
- function decreaseProductivity(address user, uint256 value)
155
- external
156
- returns (bool);
154
+ function decreaseProductivity(
155
+ address user,
156
+ uint256 value
157
+ ) external returns (bool);
157
158
 
158
159
  /// @notice take() will return the interests that callee will get at current block height.
159
160
  /// @dev it will always calculated by block.number, so it will change when block height changes.
@@ -233,28 +234,24 @@ interface Uniswap {
233
234
  uint256 reserveOut
234
235
  ) external pure returns (uint256 amountOut);
235
236
 
236
- function getAmountsOut(uint256 amountIn, address[] memory path)
237
- external
238
- pure
239
- returns (uint256[] memory amounts);
237
+ function getAmountsOut(
238
+ uint256 amountIn,
239
+ address[] memory path
240
+ ) external pure returns (uint256[] memory amounts);
240
241
  }
241
242
 
242
243
  interface UniswapFactory {
243
- function getPair(address tokenA, address tokenB)
244
- external
245
- view
246
- returns (address);
244
+ function getPair(
245
+ address tokenA,
246
+ address tokenB
247
+ ) external view returns (address);
247
248
  }
248
249
 
249
250
  interface UniswapPair {
250
251
  function getReserves()
251
252
  external
252
253
  view
253
- returns (
254
- uint112 reserve0,
255
- uint112 reserve1,
256
- uint32 blockTimestampLast
257
- );
254
+ returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
258
255
 
259
256
  function kLast() external view returns (uint256);
260
257
 
@@ -317,10 +314,9 @@ interface IIdentityV2 is IIdentity {
317
314
  uint256 dateAuthenticated
318
315
  ) external;
319
316
 
320
- function getWhitelistedRoot(address account)
321
- external
322
- view
323
- returns (address root);
317
+ function getWhitelistedRoot(
318
+ address account
319
+ ) external view returns (address root);
324
320
  }
325
321
 
326
322
  interface IUBIScheme {
@@ -335,13 +331,14 @@ interface IFirstClaimPool {
335
331
  function awardUser(address user) external returns (uint256);
336
332
 
337
333
  function claimAmount() external view returns (uint256);
334
+
335
+ function end() external;
338
336
  }
339
337
 
340
338
  interface ProxyAdmin {
341
- function getProxyImplementation(address proxy)
342
- external
343
- view
344
- returns (address);
339
+ function getProxyImplementation(
340
+ address proxy
341
+ ) external view returns (address);
345
342
 
346
343
  function getProxyAdmin(address proxy) external view returns (address);
347
344
 
@@ -371,7 +368,9 @@ interface AggregatorV3Interface {
371
368
  // getRoundData and latestRoundData should both raise "No data present"
372
369
  // if they do not have data to report, instead of returning unset values
373
370
  // which could be misinterpreted as actual reported values.
374
- function getRoundData(uint80 _roundId)
371
+ function getRoundData(
372
+ uint80 _roundId
373
+ )
375
374
  external
376
375
  view
377
376
  returns (
@@ -429,10 +428,9 @@ interface ILendingPool {
429
428
  * @param asset The address of the underlying asset of the reserve
430
429
  * @return The state of the reserve
431
430
  **/
432
- function getReserveData(address asset)
433
- external
434
- view
435
- returns (DataTypes.ReserveData memory);
431
+ function getReserveData(
432
+ address asset
433
+ ) external view returns (DataTypes.ReserveData memory);
436
434
  }
437
435
 
438
436
  interface IDonationStaking {
@@ -461,36 +459,23 @@ interface IAaveIncentivesController {
461
459
  * @param user The address of the user
462
460
  * @return The rewards
463
461
  **/
464
- function getRewardsBalance(address[] calldata assets, address user)
465
- external
466
- view
467
- returns (uint256);
462
+ function getRewardsBalance(
463
+ address[] calldata assets,
464
+ address user
465
+ ) external view returns (uint256);
468
466
  }
469
467
 
470
468
  interface IGoodStaking {
471
- function collectUBIInterest(address recipient)
472
- external
473
- returns (
474
- uint256,
475
- uint256,
476
- uint256
477
- );
469
+ function collectUBIInterest(
470
+ address recipient
471
+ ) external returns (uint256, uint256, uint256);
478
472
 
479
473
  function iToken() external view returns (address);
480
474
 
481
475
  function currentGains(
482
476
  bool _returnTokenBalanceInUSD,
483
477
  bool _returnTokenGainsInUSD
484
- )
485
- external
486
- view
487
- returns (
488
- uint256,
489
- uint256,
490
- uint256,
491
- uint256,
492
- uint256
493
- );
478
+ ) external view returns (uint256, uint256, uint256, uint256, uint256);
494
479
 
495
480
  function getRewardEarned(address user) external view returns (uint256);
496
481
 
@@ -305,7 +305,7 @@ contract InvitesFuseV2 is Initializable {
305
305
 
306
306
  function end() public ownerOrAvatar isActive {
307
307
  uint256 gdBalance = goodDollar.balanceOf(address(this));
308
- goodDollar.transfer(avatar, gdBalance);
308
+ goodDollar.transfer(msg.sender, gdBalance);
309
309
  payable(msg.sender).transfer(address(this).balance);
310
310
  active = false;
311
311
  }
@@ -100,11 +100,9 @@ contract InvitesV2 is DAOUpgradeableContract {
100
100
  levelExpirationEnabled = false;
101
101
  }
102
102
 
103
- function _authorizeUpgrade(address newImplementation)
104
- internal
105
- override
106
- ownerOrAvatar
107
- {}
103
+ function _authorizeUpgrade(
104
+ address newImplementation
105
+ ) internal override ownerOrAvatar {}
108
106
 
109
107
  function getIdentity() public view returns (IIdentityV2) {
110
108
  return IIdentityV2(nameService.getAddress("IDENTITY"));
@@ -149,11 +147,9 @@ contract InvitesV2 is DAOUpgradeableContract {
149
147
  emit InviteeJoined(inviter, msg.sender);
150
148
  }
151
149
 
152
- function _whitelistedOnChainOrDefault(address _invitee)
153
- internal
154
- view
155
- returns (uint256 chainId)
156
- {
150
+ function _whitelistedOnChainOrDefault(
151
+ address _invitee
152
+ ) internal view returns (uint256 chainId) {
157
153
  (bool success, bytes memory result) = address(getIdentity()).staticcall(
158
154
  abi.encodeWithSignature("getWhitelistedOnChainId(address)", _invitee)
159
155
  );
@@ -181,19 +177,15 @@ contract InvitesV2 is DAOUpgradeableContract {
181
177
  isLevelExpired == false;
182
178
  }
183
179
 
184
- function getInvitees(address _inviter)
185
- public
186
- view
187
- returns (address[] memory)
188
- {
180
+ function getInvitees(
181
+ address _inviter
182
+ ) public view returns (address[] memory) {
189
183
  return users[_inviter].invitees;
190
184
  }
191
185
 
192
- function getPendingInvitees(address _inviter)
193
- public
194
- view
195
- returns (address[] memory)
196
- {
186
+ function getPendingInvitees(
187
+ address _inviter
188
+ ) public view returns (address[] memory) {
197
189
  address[] memory pending = users[_inviter].pending;
198
190
  uint256 cur = 0;
199
191
  uint256 total = 0;
@@ -230,19 +222,17 @@ contract InvitesV2 is DAOUpgradeableContract {
230
222
  * @dev pay bounty for the inviter of _invitee
231
223
  * invitee need to be whitelisted
232
224
  */
233
- function bountyFor(address _invitee)
234
- public
235
- isActive
236
- returns (uint256 bounty)
237
- {
225
+ function bountyFor(
226
+ address _invitee
227
+ ) public isActive returns (uint256 bounty) {
238
228
  require(canCollectBountyFor(_invitee), "user not elligble for bounty yet");
239
229
  return _bountyFor(_invitee, true);
240
230
  }
241
231
 
242
- function _bountyFor(address _invitee, bool isSingleBounty)
243
- internal
244
- returns (uint256 bounty)
245
- {
232
+ function _bountyFor(
233
+ address _invitee,
234
+ bool isSingleBounty
235
+ ) internal returns (uint256 bounty) {
246
236
  address invitedBy = users[_invitee].invitedBy;
247
237
  uint256 joinedAt = users[_invitee].joinedAt;
248
238
  Level memory level = levels[users[invitedBy].level];
@@ -317,7 +307,7 @@ contract InvitesV2 is DAOUpgradeableContract {
317
307
 
318
308
  function end() public ownerOrAvatar isActive {
319
309
  uint256 gdBalance = goodDollar.balanceOf(address(this));
320
- goodDollar.transfer(avatar, gdBalance);
310
+ goodDollar.transfer(msg.sender, gdBalance);
321
311
  payable(msg.sender).transfer(address(this).balance);
322
312
  active = false;
323
313
  }
@@ -3,7 +3,7 @@
3
3
  // File contracts/upgradability/UUPSUtils.sol
4
4
 
5
5
  // SPDX-License-Identifier: AGPLv3
6
- pragma solidity 0.8.16;
6
+ pragma solidity >=0.8;
7
7
 
8
8
  /**
9
9
  * @title UUPS (Universal Upgradeable Proxy Standard) Shared Library
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddollar/goodprotocol",
3
- "version": "2.0.5-beta.5",
3
+ "version": "2.0.5-beta.6",
4
4
  "description": "GoodDollar Protocol",
5
5
  "scripts": {
6
6
  "prepack": "npm run minimize",
@@ -79,7 +79,7 @@
79
79
  "@gnosis.pm/safe-core-sdk-types": "^1.7.0",
80
80
  "@gnosis.pm/safe-ethers-lib": "^1.7.0",
81
81
  "@gnosis.pm/safe-service-client": "^1.4.0",
82
- "@nomicfoundation/hardhat-network-helpers": "^1.0.6",
82
+ "@nomicfoundation/hardhat-network-helpers": "^1.0.8",
83
83
  "@nomiclabs/hardhat-ethers": "^2.2.1",
84
84
  "@nomiclabs/hardhat-etherscan": "^3.1.0",
85
85
  "@nomiclabs/hardhat-waffle": "^2.0.3",
@@ -439,7 +439,8 @@
439
439
  "GuardiansSafe": "0x5878123fe880881f1Ecc92D5fd31e5D3F5Fba2e9",
440
440
  "IdentityOld": "0xFa8d865A962ca8456dF331D78806152d3aC5B84F",
441
441
  "MultichainRouter": "0x735aBE48e8782948a37C7765ECb76b98CdE97B0F",
442
- "GoodDollarMintBurnWrapper": "0x031b2B7C7854dd8EE9C4A644D7e54aD17F56e3cB"
442
+ "GoodDollarMintBurnWrapper": "0x031b2B7C7854dd8EE9C4A644D7e54aD17F56e3cB",
443
+ "CommunitySafe": "0x5Eb5f5fE13d1D5e6440DbD5913412299Bc5B5564"
443
444
  },
444
445
  "pre-production-celo": {
445
446
  "ProxyFactory": "0x99C22e78A579e2176311c736C4c9F0b0D5A47806",
@@ -477,7 +478,8 @@
477
478
  "Faucet": "0x4F93Fa058b03953C851eFaA2e4FC5C34afDFAb84",
478
479
  "Invites": "0x36829D1Cda92FFF5782d5d48991620664FC857d3",
479
480
  "UBIScheme": "0x43d72Ff17701B2DA814620735C39C620Ce0ea4A1",
480
- "OneTimePayments": "0xB27D247f5C2a61D2Cb6b6E67FEE51d839447e97d"
481
+ "OneTimePayments": "0xB27D247f5C2a61D2Cb6b6E67FEE51d839447e97d",
482
+ "SwapHelper": "0xE45CaB86609a16dFaDec112FDd61E4EA80EdaA8D"
481
483
  },
482
484
  "gnosis": {
483
485
  "GuardiansSafe": "0x84c10b45fe51bfb4f86c19a47fdbc187d4572fb8"
@@ -143,6 +143,7 @@ export const executeViaGuardian = async (
143
143
  let release: { [key: string]: any } = dao[network || networkName];
144
144
  const ctrl = await (await ethers.getContractAt("Controller", release.Controller)).connect(guardian);
145
145
 
146
+ const results = [];
146
147
  for (let i = 0; i < contracts.length; i++) {
147
148
  const contract = contracts[i];
148
149
  console.log("executing:", contracts[i], functionSigs[i], functionInputs[i]);
@@ -151,7 +152,11 @@ export const executeViaGuardian = async (
151
152
  if (contract === ctrl.address) {
152
153
  console.log("executing directly on controller:", sigHash, encoded);
153
154
 
154
- await guardian.sendTransaction({ to: contract, data: encoded }).then(printDeploy);
155
+ const tx = await guardian
156
+ .sendTransaction({ to: contract, data: encoded })
157
+ .then(printDeploy)
158
+ .then(_ => _.wait());
159
+ results.push(tx);
155
160
  } else {
156
161
  const simulationResult = await ctrl.callStatic.genericCall(contract, encoded, release.Avatar, ethValues[i], {
157
162
  from: await guardian.getAddress()
@@ -162,9 +167,15 @@ export const executeViaGuardian = async (
162
167
  simulationResult
163
168
  });
164
169
  if (simulationResult[0] === false) throw new Error("simulation failed:" + contract);
165
- await ctrl.genericCall(contract, encoded, release.Avatar, ethValues[i]).then(printDeploy);
170
+ const tx = await ctrl
171
+ .genericCall(contract, encoded, release.Avatar, ethValues[i])
172
+ .then(printDeploy)
173
+ .then(_ => _.wait());
174
+ // console.log("generic call events:", tx.events);
175
+ results.push(tx);
166
176
  }
167
177
  }
178
+ return results;
168
179
  };
169
180
 
170
181
  export const executeViaSafe = async (
@@ -0,0 +1,255 @@
1
+ /**
2
+ * increase rate of UBI distribution on Celo
3
+ * also includes old foundation funds transfers from firstclaimpool and avatar towards initial topping of the UBI pool for the launch campaign
4
+ */
5
+
6
+ import { ethers, network } from "hardhat";
7
+ import { defaultsDeep } from "lodash";
8
+ import prompt from "prompt";
9
+ import { reset } from "@nomicfoundation/hardhat-network-helpers";
10
+
11
+ import { executeViaGuardian, executeViaSafe, verifyProductionSigner } from "../multichain-deploy/helpers";
12
+
13
+ import ProtocolSettings from "../../releases/deploy-settings.json";
14
+
15
+ import dao from "../../releases/deployment.json";
16
+
17
+ const { name: networkName } = network;
18
+
19
+ export const step1 = async () => {
20
+ const isProduction = networkName.includes("production");
21
+ let [root, ...signers] = await ethers.getSigners();
22
+
23
+ if (isProduction) verifyProductionSigner(root);
24
+
25
+ let networkEnv = networkName.split("-")[0];
26
+ const isForkSimulation = networkName === "localhost";
27
+ if (isForkSimulation) networkEnv = "production";
28
+ const fuseNetwork = networkEnv;
29
+
30
+ if (networkEnv === "fuse") networkEnv = "development";
31
+ const celoNetwork = networkEnv + "-celo";
32
+ const mainnetNetwork = `${networkName === "localhost" ? "production" : networkName}-mainnet`; //simulate production on localhost requires running hardhat node in fork mode
33
+
34
+ let protocolSettings = defaultsDeep({}, ProtocolSettings[networkName], ProtocolSettings["default"]);
35
+
36
+ if (isForkSimulation)
37
+ // fund safe with eth so we can simulate TXs
38
+ await root.sendTransaction({ to: dao[mainnetNetwork].GuardiansSafe, value: ethers.constants.WeiPerEther });
39
+
40
+ console.log("got signers:", {
41
+ networkName,
42
+ root: root.address,
43
+ balance: await ethers.provider.getBalance(root.address).then(_ => _.toString()),
44
+ mainnetNetwork,
45
+ fuseNetwork,
46
+ celoNetwork
47
+ });
48
+
49
+ const proposalContracts = [
50
+ dao[mainnetNetwork].GoodReserveCDai, // update the nonubi bps to 55%. 10% community fund + 45% celo ubi
51
+ dao[mainnetNetwork].DistributionHelper, //set community fund to 0.1818 so it gets 10% from 55%
52
+ dao[mainnetNetwork].DistributionHelper //set celo ubi to 0.8182 so it gets 45% from 55%
53
+ ];
54
+
55
+ const proposalEthValues = proposalContracts.map(_ => 0);
56
+
57
+ const proposalFunctionSignatures = [
58
+ "setDistributionHelper(address,uint32)",
59
+ "addOrUpdateRecipient((uint32,uint32,address,uint8))",
60
+ "addOrUpdateRecipient((uint32,uint32,address,uint8))"
61
+ ];
62
+
63
+ const proposalFunctionInputs = [
64
+ ethers.utils.defaultAbiCoder.encode(["address", "uint32"], [dao[mainnetNetwork].DistributionHelper, 5500]),
65
+ ethers.utils.defaultAbiCoder.encode(
66
+ ["uint32", "uint32", "address", "uint8"],
67
+ [8182, 42220, dao[celoNetwork].UBIScheme, 1]
68
+ ),
69
+ ethers.utils.defaultAbiCoder.encode(
70
+ ["uint32", "uint32", "address", "uint8"],
71
+ [1818, 122, dao[fuseNetwork].CommunitySafe, 0] //community safe on fuse
72
+ )
73
+ ];
74
+
75
+ if (isProduction) {
76
+ await executeViaSafe(
77
+ proposalContracts,
78
+ proposalEthValues,
79
+ proposalFunctionSignatures,
80
+ proposalFunctionInputs,
81
+ protocolSettings.guardiansSafe,
82
+ "mainnet"
83
+ );
84
+ } else {
85
+ await executeViaGuardian(
86
+ proposalContracts,
87
+ proposalEthValues,
88
+ proposalFunctionSignatures,
89
+ proposalFunctionInputs,
90
+ isForkSimulation ? await ethers.getImpersonatedSigner(dao[mainnetNetwork].GuardiansSafe) : root,
91
+ mainnetNetwork
92
+ );
93
+ }
94
+
95
+ if (isForkSimulation) {
96
+ const reserve = await ethers.getContractAt("GoodReserveCDai", dao[mainnetNetwork].GoodReserveCDai);
97
+ //verify balance of avatar is 0
98
+ const events = await reserve.queryFilter(reserve.filters.DistributionHelperSet(), -10);
99
+ console.log({ events });
100
+ console.assert(events[0].args?.bps === 5500, "wrong bps");
101
+ const helper = await ethers.getContractAt("DistributionHelper", dao[mainnetNetwork].DistributionHelper);
102
+ const helperEvents = await helper.queryFilter(helper.filters.RecipientUpdated(), -10);
103
+ console.log(
104
+ "helperEvents",
105
+ helperEvents.map(_ => _.args)
106
+ );
107
+
108
+ //verify multichain bridge did burn
109
+ console.assert(
110
+ helperEvents.find(
111
+ _ =>
112
+ _.args?.recipient[0] === 1818 &&
113
+ _.args?.recipient[2] == dao[fuseNetwork].CommunitySafe &&
114
+ _.args?.recipient[1] === 122 &&
115
+ _.args?.recipient[3] === 0
116
+ ),
117
+ "wrong community pool bps"
118
+ );
119
+ console.assert(
120
+ helperEvents.find(
121
+ _ =>
122
+ _.args?.recipient[0] === 8182 &&
123
+ _.args?.recipient[2] == dao[celoNetwork].UBIScheme &&
124
+ _.args?.recipient[1] === 42220 &&
125
+ _.args?.recipient[3] === 1
126
+ ),
127
+ "wrong celo ubi pool bps"
128
+ );
129
+ }
130
+ };
131
+
132
+ export const step2 = async () => {
133
+ const isProduction = networkName.includes("production");
134
+ let [root, ...signers] = await ethers.getSigners();
135
+
136
+ if (isProduction) verifyProductionSigner(root);
137
+
138
+ let networkEnv = networkName.split("-")[0];
139
+ const isForkSimulation = networkName === "localhost";
140
+ if (isForkSimulation) networkEnv = "production";
141
+ const fuseNetwork = networkEnv;
142
+
143
+ if (networkEnv === "fuse") networkEnv = "development";
144
+ const celoNetwork = networkEnv + "-celo";
145
+ const mainnetNetwork = `${networkName === "localhost" ? "production" : networkName}-mainnet`; //simulate production on localhost requires running hardhat node in fork mode
146
+
147
+ let protocolSettings = defaultsDeep({}, ProtocolSettings[networkName], ProtocolSettings["default"]);
148
+
149
+ if (isForkSimulation)
150
+ // fund safe with eth so we can simulate TXs
151
+ await root.sendTransaction({ to: dao[fuseNetwork].GuardiansSafe, value: ethers.constants.WeiPerEther });
152
+
153
+ console.log("got signers:", {
154
+ networkName,
155
+ root: root.address,
156
+ balance: await ethers.provider.getBalance(root.address).then(_ => _.toString()),
157
+ mainnetNetwork,
158
+ fuseNetwork,
159
+ celoNetwork
160
+ });
161
+
162
+ const fuseProposalContracts = [
163
+ dao[fuseNetwork].FirstClaimPool, // end the pool to get locked funds
164
+ dao[fuseNetwork].GoodDollar, //approve multichain wrapper
165
+ dao[fuseNetwork].MultichainRouter //anyswapout
166
+ ];
167
+
168
+ const fuseProposalEthValues = fuseProposalContracts.map(_ => 0);
169
+
170
+ const fuseProposalFunctionSignatures = [
171
+ "end()",
172
+ // "transferAndCall(address,uint256,bytes)"//transferAndcall not working in simulation. using aprrove+anyswapout
173
+ "approve(address,uint256)",
174
+ "anySwapOut(address,address,uint256,uint256)"
175
+ ];
176
+
177
+ const gd = await ethers.getContractAt("GoodDollar", dao[fuseNetwork].GoodDollar);
178
+ const aBalance = await gd.balanceOf(dao[fuseNetwork].Avatar);
179
+ const bBalance = await gd.balanceOf(dao[fuseNetwork].FirstClaimPool);
180
+
181
+ console.log("balances to bridge:", aBalance.toString(), bBalance.toString());
182
+ const fuseProposalFunctionInputs = [
183
+ ethers.utils.defaultAbiCoder.encode([], []),
184
+ ethers.utils.defaultAbiCoder.encode(
185
+ ["address", "uint256"],
186
+ [dao[fuseNetwork].GoodDollarMintBurnWrapper, aBalance.add(bBalance)]
187
+ ),
188
+ ethers.utils.defaultAbiCoder.encode(
189
+ ["address", "address", "uint256", "uint256"],
190
+ [dao[fuseNetwork].GoodDollarMintBurnWrapper, dao[celoNetwork].UBIScheme, aBalance.add(bBalance), 42220]
191
+ )
192
+
193
+ //transferAndCall isnt working in simualation for some reason
194
+ // ethers.utils.defaultAbiCoder.encode(
195
+ // ["address", "uint256", "bytes"],
196
+ // [
197
+ // dao[fuseNetwork].GoodDollarMintBurnWrapper,
198
+ // aBalance.add(bBalance),
199
+ // ethers.utils.defaultAbiCoder.encode(["address", "uint256"], [dao[celoNetwork].UBIScheme, 42220])
200
+ // ] //target ubipool on celo for multichain bridge
201
+ // )
202
+ ];
203
+
204
+ const totalSupplyBefore = await gd.totalSupply();
205
+ if (isProduction) {
206
+ await executeViaSafe(
207
+ fuseProposalContracts,
208
+ fuseProposalEthValues,
209
+ fuseProposalFunctionSignatures,
210
+ fuseProposalFunctionInputs,
211
+ protocolSettings.guardiansSafe,
212
+ "fuse"
213
+ );
214
+ } else {
215
+ await executeViaGuardian(
216
+ fuseProposalContracts,
217
+ fuseProposalEthValues,
218
+ fuseProposalFunctionSignatures,
219
+ fuseProposalFunctionInputs,
220
+ isForkSimulation ? await ethers.getImpersonatedSigner(dao[fuseNetwork].GuardiansSafe) : root,
221
+ fuseNetwork
222
+ );
223
+ }
224
+
225
+ if (isForkSimulation) {
226
+ //verify balance of avatar is 0
227
+ console.assert((await gd.balanceOf(dao[fuseNetwork].Avatar)).eq(0), await gd.balanceOf(dao[fuseNetwork].Avatar));
228
+ //verify multichain bridge did burn
229
+ console.assert((await gd.totalSupply()).lt(totalSupplyBefore), "bridge didnt burn G$s");
230
+ }
231
+ };
232
+
233
+ export const main = async () => {
234
+ prompt.start();
235
+ const { stepNumber } = await prompt.get(["stepNumber"]);
236
+
237
+ console.log("running step:", { stepNumber });
238
+ switch (stepNumber) {
239
+ case "1":
240
+ await reset("https://cloudflare-eth.com");
241
+ await step1();
242
+ break;
243
+
244
+ //to simulate run first
245
+ //npx hardhat node --fork https://rpc.fuse.io
246
+ //then run npx hardhat run scripts/proposals/gip-14_1.ts --network localhost
247
+ case "2":
248
+ await reset("https://rpc.fuse.io");
249
+ await step2();
250
+ break;
251
+ }
252
+ // await upgrade().catch(console.log);
253
+ };
254
+
255
+ main();