@gooddollar/goodprotocol 2.0.7-beta.2 → 2.0.7-beta.4

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 (227) hide show
  1. package/artifacts/abis/BuyGDClone.min.json +1 -0
  2. package/artifacts/abis/BuyGDCloneFactory.min.json +1 -0
  3. package/artifacts/abis/IStaticOracle.min.json +1 -0
  4. package/artifacts/abis/ISwapRouter.min.json +1 -0
  5. package/artifacts/contracts/DAOStackInterfaces.sol/Avatar.dbg.json +1 -1
  6. package/artifacts/contracts/DAOStackInterfaces.sol/Controller.dbg.json +1 -1
  7. package/artifacts/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface.dbg.json +1 -1
  8. package/artifacts/contracts/DAOStackInterfaces.sol/IntVoteInterface.dbg.json +1 -1
  9. package/artifacts/contracts/DAOStackInterfaces.sol/ReputationInterface.dbg.json +1 -1
  10. package/artifacts/contracts/DAOStackInterfaces.sol/SchemeRegistrar.dbg.json +1 -1
  11. package/artifacts/contracts/Interfaces.sol/AggregatorV3Interface.dbg.json +1 -1
  12. package/artifacts/contracts/Interfaces.sol/ERC20.dbg.json +1 -1
  13. package/artifacts/contracts/Interfaces.sol/IAaveIncentivesController.dbg.json +1 -1
  14. package/artifacts/contracts/Interfaces.sol/IAdminWallet.dbg.json +1 -1
  15. package/artifacts/contracts/Interfaces.sol/IDonationStaking.dbg.json +1 -1
  16. package/artifacts/contracts/Interfaces.sol/IERC2917.dbg.json +1 -1
  17. package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.dbg.json +1 -1
  18. package/artifacts/contracts/Interfaces.sol/IGoodDollar.dbg.json +1 -1
  19. package/artifacts/contracts/Interfaces.sol/IGoodStaking.dbg.json +1 -1
  20. package/artifacts/contracts/Interfaces.sol/IHasRouter.dbg.json +1 -1
  21. package/artifacts/contracts/Interfaces.sol/IIdentity.dbg.json +1 -1
  22. package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +1 -1
  23. package/artifacts/contracts/Interfaces.sol/ILendingPool.dbg.json +1 -1
  24. package/artifacts/contracts/Interfaces.sol/IMultichainRouter.dbg.json +1 -1
  25. package/artifacts/contracts/Interfaces.sol/INameService.dbg.json +1 -1
  26. package/artifacts/contracts/Interfaces.sol/IUBIScheme.dbg.json +1 -1
  27. package/artifacts/contracts/Interfaces.sol/ProxyAdmin.dbg.json +1 -1
  28. package/artifacts/contracts/Interfaces.sol/Reserve.dbg.json +1 -1
  29. package/artifacts/contracts/Interfaces.sol/Staking.dbg.json +1 -1
  30. package/artifacts/contracts/Interfaces.sol/Uniswap.dbg.json +1 -1
  31. package/artifacts/contracts/Interfaces.sol/UniswapFactory.dbg.json +1 -1
  32. package/artifacts/contracts/Interfaces.sol/UniswapPair.dbg.json +1 -1
  33. package/artifacts/contracts/Interfaces.sol/cERC20.dbg.json +1 -1
  34. package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
  35. package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
  36. package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.dbg.json +1 -1
  37. package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
  38. package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
  39. package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
  40. package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.dbg.json +1 -1
  41. package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +1 -1
  42. package/artifacts/contracts/governance/GoodDollarStaking.sol/IStakingUpgrade.dbg.json +1 -1
  43. package/artifacts/contracts/governance/GoodDollarStaking.sol/RewardsMinter.dbg.json +1 -1
  44. package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
  45. package/artifacts/contracts/governance/MultiBaseGovernanceShareField.sol/MultiBaseGovernanceShareField.dbg.json +1 -1
  46. package/artifacts/contracts/governance/Reputation.sol/Reputation.dbg.json +1 -1
  47. package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
  48. package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.json +2 -2
  49. package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
  50. package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
  51. package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.json +2 -2
  52. package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
  53. package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +1 -1
  54. package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.json +2 -2
  55. package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
  56. package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
  57. package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
  58. package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
  59. package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
  60. package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
  61. package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
  62. package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.dbg.json +1 -1
  63. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
  64. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.json +2 -2
  65. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
  66. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.json +2 -2
  67. package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.dbg.json +1 -1
  68. package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
  69. package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
  70. package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
  71. package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.json +2 -2
  72. package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
  73. package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
  74. package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.json +2 -2
  75. package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.dbg.json +1 -1
  76. package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.dbg.json +1 -1
  77. package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
  78. package/artifacts/contracts/mocks/MultichainRouterMock.sol/IWrapper.dbg.json +1 -1
  79. package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.dbg.json +1 -1
  80. package/artifacts/contracts/mocks/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
  81. package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
  82. package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
  83. package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.json +2 -2
  84. package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.dbg.json +1 -1
  85. package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
  86. package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
  87. package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
  88. package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
  89. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
  90. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
  91. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
  92. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
  93. package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
  94. package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
  95. package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
  96. package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
  97. package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
  98. package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
  99. package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
  100. package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
  101. package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
  102. package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.json +2 -2
  103. package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.dbg.json +1 -1
  104. package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.json +2 -2
  105. package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.dbg.json +1 -1
  106. package/artifacts/contracts/reserve/GoodReserveCDai.sol/ContributionCalc.dbg.json +1 -1
  107. package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.dbg.json +1 -1
  108. package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.json +2 -2
  109. package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
  110. package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
  111. package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.dbg.json +1 -1
  112. package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.json +2 -2
  113. package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.dbg.json +1 -1
  114. package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.dbg.json +1 -1
  115. package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.dbg.json +1 -1
  116. package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.dbg.json +1 -1
  117. package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.json +2 -2
  118. package/artifacts/contracts/staking/SimpleStaking.sol/SimpleStaking.dbg.json +1 -1
  119. package/artifacts/contracts/staking/SimpleStakingV2.sol/SimpleStakingV2.dbg.json +1 -1
  120. package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.dbg.json +1 -1
  121. package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.dbg.json +1 -1
  122. package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.json +2 -2
  123. package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
  124. package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.json +2 -2
  125. package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
  126. package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.json +2 -2
  127. package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
  128. package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.json +2 -2
  129. package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
  130. package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.json +2 -2
  131. package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
  132. package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.json +2 -2
  133. package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.dbg.json +1 -1
  134. package/artifacts/contracts/staking/utils/StakingRewardsFixedAPY.sol/StakingRewardsFixedAPY.dbg.json +1 -1
  135. package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.dbg.json +1 -1
  136. package/artifacts/contracts/token/ERC677.sol/ERC677.dbg.json +1 -1
  137. package/artifacts/contracts/token/ERC677.sol/ERC677Receiver.dbg.json +1 -1
  138. package/artifacts/contracts/token/FeesFormula.sol/IFeesFormula.dbg.json +1 -1
  139. package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.dbg.json +1 -1
  140. package/artifacts/contracts/token/superfluid/ERC20Permit.sol/ERC20Permit.dbg.json +1 -1
  141. package/artifacts/contracts/token/superfluid/ERC20Permit.sol/SelfApprove.dbg.json +1 -1
  142. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/IGoodDollarCustom.dbg.json +1 -1
  143. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/ISuperGoodDollar.dbg.json +1 -1
  144. package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
  145. package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
  146. package/artifacts/contracts/token/superfluid/SuperfluidToken.sol/SuperfluidToken.dbg.json +1 -1
  147. package/artifacts/contracts/token/superfluid/UUPSProxiable.sol/UUPSProxiable.dbg.json +1 -1
  148. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/Proxy.dbg.json +1 -1
  149. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.dbg.json +1 -1
  150. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.dbg.json +1 -1
  151. package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.dbg.json +1 -1
  152. package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.dbg.json +1 -1
  153. package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
  154. package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
  155. package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.dbg.json +1 -1
  156. package/artifacts/contracts/utils/BulkProof.sol/BulkProof.dbg.json +1 -1
  157. package/artifacts/contracts/utils/BulkProof.sol/BulkProof.json +2 -2
  158. package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.dbg.json +1 -1
  159. package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.json +2 -2
  160. package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.dbg.json +4 -0
  161. package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.json +250 -0
  162. package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.dbg.json +4 -0
  163. package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.json +75 -0
  164. package/artifacts/contracts/utils/BuyGDClone.sol/IStaticOracle.dbg.json +4 -0
  165. package/artifacts/contracts/utils/BuyGDClone.sol/IStaticOracle.json +79 -0
  166. package/artifacts/contracts/utils/BuyGDClone.sol/ISwapRouter.dbg.json +4 -0
  167. package/artifacts/contracts/utils/BuyGDClone.sol/ISwapRouter.json +205 -0
  168. package/artifacts/contracts/utils/DAOContract.sol/DAOContract.dbg.json +1 -1
  169. package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
  170. package/artifacts/contracts/utils/DSMath.sol/DSMath.dbg.json +1 -1
  171. package/artifacts/contracts/utils/DataTypes.sol/DataTypes.dbg.json +1 -1
  172. package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.dbg.json +1 -1
  173. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
  174. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/IRouter.dbg.json +1 -1
  175. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/PausableControl.dbg.json +1 -1
  176. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.dbg.json +1 -1
  177. package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.dbg.json +1 -1
  178. package/artifacts/contracts/utils/MultiCall.sol/Multicall.dbg.json +1 -1
  179. package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.dbg.json +1 -1
  180. package/artifacts/contracts/utils/NameService.sol/NameService.dbg.json +1 -1
  181. package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.dbg.json +1 -1
  182. package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.dbg.json +1 -1
  183. package/artifacts/contracts/utils/ProtocolUpgrade.sol/OldMarketMaker.dbg.json +1 -1
  184. package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.dbg.json +1 -1
  185. package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
  186. package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
  187. package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
  188. package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.dbg.json +1 -1
  189. package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.dbg.json +1 -1
  190. package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.dbg.json +1 -1
  191. package/contracts/invite/InvitesFuseV2.sol +5 -3
  192. package/contracts/invite/InvitesV2.sol +5 -3
  193. package/contracts/reserve/DistributionHelper.sol +12 -9
  194. package/contracts/utils/BuyGDClone.sol +309 -0
  195. package/package.json +1 -1
  196. package/scripts/upgrades/multichain-temp-fix.ts +129 -0
  197. package/truffle-config.js +4 -0
  198. package/types/BuyGDClone.ts +353 -0
  199. package/types/BuyGDCloneFactory.ts +112 -0
  200. package/types/IStaticOracle.ts +170 -0
  201. package/types/ISwapRouter.ts +298 -0
  202. package/types/factories/AaveStakingFactory__factory.ts +1 -1
  203. package/types/factories/BuyAndBridgeHelper__factory.ts +1 -1
  204. package/types/factories/BuyGDCloneFactory__factory.ts +146 -0
  205. package/types/factories/BuyGDClone__factory.ts +318 -0
  206. package/types/factories/CompoundStakingFactory__factory.ts +1 -1
  207. package/types/factories/DistributionHelperTestHelper__factory.ts +1 -1
  208. package/types/factories/DistributionHelperTest__factory.ts +1 -1
  209. package/types/factories/DistributionHelper__factory.ts +1 -1
  210. package/types/factories/DonationsStaking__factory.ts +1 -1
  211. package/types/factories/ExchangeHelper__factory.ts +1 -1
  212. package/types/factories/GoodAaveStakingV2__factory.ts +1 -1
  213. package/types/factories/GoodAaveStaking__factory.ts +1 -1
  214. package/types/factories/GoodCompoundStakingTest__factory.ts +1 -1
  215. package/types/factories/GoodCompoundStakingV2__factory.ts +1 -1
  216. package/types/factories/GoodCompoundStaking__factory.ts +1 -1
  217. package/types/factories/GoodFundManagerTest__factory.ts +1 -1
  218. package/types/factories/GoodFundManager__factory.ts +1 -1
  219. package/types/factories/GoodReserveCDai__factory.ts +1 -1
  220. package/types/factories/IStaticOracle__factory.ts +91 -0
  221. package/types/factories/ISwapRouter__factory.ts +217 -0
  222. package/types/factories/InvitesFuseV2__factory.ts +1 -1
  223. package/types/factories/InvitesV2__factory.ts +1 -1
  224. package/types/factories/OverMintTesterRegularStake__factory.ts +1 -1
  225. package/types/factories/StakersDistribution__factory.ts +1 -1
  226. package/types/hardhat.d.ts +36 -0
  227. package/types/index.ts +8 -0
@@ -0,0 +1,205 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "ISwapRouter",
4
+ "sourceName": "contracts/utils/BuyGDClone.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "components": [
10
+ {
11
+ "internalType": "bytes",
12
+ "name": "path",
13
+ "type": "bytes"
14
+ },
15
+ {
16
+ "internalType": "address",
17
+ "name": "recipient",
18
+ "type": "address"
19
+ },
20
+ {
21
+ "internalType": "uint256",
22
+ "name": "amountIn",
23
+ "type": "uint256"
24
+ },
25
+ {
26
+ "internalType": "uint256",
27
+ "name": "amountOutMinimum",
28
+ "type": "uint256"
29
+ }
30
+ ],
31
+ "internalType": "struct ISwapRouter.ExactInputParams",
32
+ "name": "params",
33
+ "type": "tuple"
34
+ }
35
+ ],
36
+ "name": "exactInput",
37
+ "outputs": [
38
+ {
39
+ "internalType": "uint256",
40
+ "name": "amountOut",
41
+ "type": "uint256"
42
+ }
43
+ ],
44
+ "stateMutability": "payable",
45
+ "type": "function"
46
+ },
47
+ {
48
+ "inputs": [
49
+ {
50
+ "components": [
51
+ {
52
+ "internalType": "address",
53
+ "name": "tokenIn",
54
+ "type": "address"
55
+ },
56
+ {
57
+ "internalType": "address",
58
+ "name": "tokenOut",
59
+ "type": "address"
60
+ },
61
+ {
62
+ "internalType": "uint24",
63
+ "name": "fee",
64
+ "type": "uint24"
65
+ },
66
+ {
67
+ "internalType": "address",
68
+ "name": "recipient",
69
+ "type": "address"
70
+ },
71
+ {
72
+ "internalType": "uint256",
73
+ "name": "amountIn",
74
+ "type": "uint256"
75
+ },
76
+ {
77
+ "internalType": "uint256",
78
+ "name": "amountOutMinimum",
79
+ "type": "uint256"
80
+ },
81
+ {
82
+ "internalType": "uint160",
83
+ "name": "sqrtPriceLimitX96",
84
+ "type": "uint160"
85
+ }
86
+ ],
87
+ "internalType": "struct ISwapRouter.ExactInputSingleParams",
88
+ "name": "params",
89
+ "type": "tuple"
90
+ }
91
+ ],
92
+ "name": "exactInputSingle",
93
+ "outputs": [
94
+ {
95
+ "internalType": "uint256",
96
+ "name": "amountOut",
97
+ "type": "uint256"
98
+ }
99
+ ],
100
+ "stateMutability": "payable",
101
+ "type": "function"
102
+ },
103
+ {
104
+ "inputs": [
105
+ {
106
+ "components": [
107
+ {
108
+ "internalType": "bytes",
109
+ "name": "path",
110
+ "type": "bytes"
111
+ },
112
+ {
113
+ "internalType": "address",
114
+ "name": "recipient",
115
+ "type": "address"
116
+ },
117
+ {
118
+ "internalType": "uint256",
119
+ "name": "amountOut",
120
+ "type": "uint256"
121
+ },
122
+ {
123
+ "internalType": "uint256",
124
+ "name": "amountInMaximum",
125
+ "type": "uint256"
126
+ }
127
+ ],
128
+ "internalType": "struct ISwapRouter.ExactOutputParams",
129
+ "name": "params",
130
+ "type": "tuple"
131
+ }
132
+ ],
133
+ "name": "exactOutput",
134
+ "outputs": [
135
+ {
136
+ "internalType": "uint256",
137
+ "name": "amountIn",
138
+ "type": "uint256"
139
+ }
140
+ ],
141
+ "stateMutability": "payable",
142
+ "type": "function"
143
+ },
144
+ {
145
+ "inputs": [
146
+ {
147
+ "components": [
148
+ {
149
+ "internalType": "address",
150
+ "name": "tokenIn",
151
+ "type": "address"
152
+ },
153
+ {
154
+ "internalType": "address",
155
+ "name": "tokenOut",
156
+ "type": "address"
157
+ },
158
+ {
159
+ "internalType": "uint24",
160
+ "name": "fee",
161
+ "type": "uint24"
162
+ },
163
+ {
164
+ "internalType": "address",
165
+ "name": "recipient",
166
+ "type": "address"
167
+ },
168
+ {
169
+ "internalType": "uint256",
170
+ "name": "amountOut",
171
+ "type": "uint256"
172
+ },
173
+ {
174
+ "internalType": "uint256",
175
+ "name": "amountInMaximum",
176
+ "type": "uint256"
177
+ },
178
+ {
179
+ "internalType": "uint160",
180
+ "name": "sqrtPriceLimitX96",
181
+ "type": "uint160"
182
+ }
183
+ ],
184
+ "internalType": "struct ISwapRouter.ExactOutputSingleParams",
185
+ "name": "params",
186
+ "type": "tuple"
187
+ }
188
+ ],
189
+ "name": "exactOutputSingle",
190
+ "outputs": [
191
+ {
192
+ "internalType": "uint256",
193
+ "name": "amountIn",
194
+ "type": "uint256"
195
+ }
196
+ ],
197
+ "stateMutability": "payable",
198
+ "type": "function"
199
+ }
200
+ ],
201
+ "bytecode": "0x",
202
+ "deployedBytecode": "0x",
203
+ "linkReferences": {},
204
+ "deployedLinkReferences": {}
205
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e242334daf6949c15ec78719b8a396c7.json"
3
+ "buildInfo": "../../../build-info/0b1ffe2adf61568ecaaa5a3571f228a2.json"
4
4
  }
@@ -272,11 +272,13 @@ contract InvitesFuseV2 is Initializable {
272
272
  function collectBounties() public isActive {
273
273
  address[] storage pendings = users[msg.sender].pending;
274
274
  uint256 totalBounties = 0;
275
- for (int256 i = int256(pendings.length) - 1; i >= 0; i--) {
276
- if (gasleft() < 185000) break; // leave enough gas for the token transfer around 150k if we are using supertoken
277
- address pending = pendings[uint256(i)];
275
+ for (uint256 i = pendings.length; i > 0; i--) {
276
+ if (gasleft() < 120000) break; // leave enough gas for the inviter transfer around 120k
277
+ address pending = pendings[i - 1];
278
278
  if (canCollectBountyFor(pending)) {
279
+ if (gasleft() < 240000) break; // leave enough gas for the invitee+inviter transfer around 120k
279
280
  totalBounties += _bountyFor(pending, false);
281
+ pendings[i - 1] = pendings[pendings.length - 1];
280
282
  pendings.pop();
281
283
  }
282
284
  }
@@ -278,11 +278,13 @@ contract InvitesV2 is DAOUpgradeableContract {
278
278
  function collectBounties() public isActive {
279
279
  address[] storage pendings = users[msg.sender].pending;
280
280
  uint256 totalBounties = 0;
281
- for (int256 i = int256(pendings.length) - 1; i >= 0; i--) {
282
- if (gasleft() < 185000) break; // leave enough gas for the token transfer around 150k if we are using supertoken
283
- address pending = pendings[uint256(i)];
281
+ for (uint256 i = pendings.length; i > 0; i--) {
282
+ if (gasleft() < 185000) break; // leave enough gas for the inviter transfer around 150k each if we are using supertoken
283
+ address pending = pendings[i - 1];
284
284
  if (canCollectBountyFor(pending)) {
285
+ if (gasleft() < 300000) break; // leave enough gas for the invitee+inviter transfer around 150k each if we are using supertoken
285
286
  totalBounties += _bountyFor(pending, false);
287
+ pendings[i - 1] = pendings[pendings.length - 1];
286
288
  pendings.pop();
287
289
  }
288
290
  }
@@ -22,7 +22,8 @@ contract DistributionHelper is
22
22
  enum TransferType {
23
23
  FuseBridge,
24
24
  MultichainBridge,
25
- Contract
25
+ TransferAndCall,
26
+ Transfer
26
27
  }
27
28
 
28
29
  struct DistributionRecipient {
@@ -94,10 +95,9 @@ contract DistributionHelper is
94
95
  * @notice add or update a recipient details, if address exists it will update, otherwise add
95
96
  * to "remove" set recipient bps to 0. only ADMIN_ROLE can call this.
96
97
  */
97
- function addOrUpdateRecipient(DistributionRecipient memory _recipient)
98
- external
99
- onlyRole(DEFAULT_ADMIN_ROLE)
100
- {
98
+ function addOrUpdateRecipient(
99
+ DistributionRecipient memory _recipient
100
+ ) external onlyRole(DEFAULT_ADMIN_ROLE) {
101
101
  // console.log("addOrUpdate addr: %s", _recipient.addr);
102
102
  for (uint256 i = 0; i < distributionRecipients.length; i++) {
103
103
  // console.log(
@@ -122,9 +122,10 @@ contract DistributionHelper is
122
122
  * @param _recipient data about the recipient
123
123
  * @param _amount how much to send
124
124
  */
125
- function distribute(DistributionRecipient storage _recipient, uint256 _amount)
126
- internal
127
- {
125
+ function distribute(
126
+ DistributionRecipient storage _recipient,
127
+ uint256 _amount
128
+ ) internal {
128
129
  if (_recipient.transferType == TransferType.FuseBridge) {
129
130
  nativeToken().transferAndCall(
130
131
  fuseBridge,
@@ -139,8 +140,10 @@ contract DistributionHelper is
139
140
  _amount,
140
141
  _recipient.chainId
141
142
  );
142
- } else if (_recipient.transferType == TransferType.Contract) {
143
+ } else if (_recipient.transferType == TransferType.TransferAndCall) {
143
144
  nativeToken().transferAndCall(_recipient.addr, _amount, "");
145
+ } else if (_recipient.transferType == TransferType.Transfer) {
146
+ nativeToken().transfer(_recipient.addr, _amount);
144
147
  }
145
148
  }
146
149
  }