@gooddollar/goodprotocol 2.0.24 → 2.0.25-beta.1

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 (177) hide show
  1. package/artifacts/contracts/DAOStackInterfaces.sol/Avatar.dbg.json +1 -1
  2. package/artifacts/contracts/DAOStackInterfaces.sol/Controller.dbg.json +1 -1
  3. package/artifacts/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface.dbg.json +1 -1
  4. package/artifacts/contracts/DAOStackInterfaces.sol/IntVoteInterface.dbg.json +1 -1
  5. package/artifacts/contracts/DAOStackInterfaces.sol/ReputationInterface.dbg.json +1 -1
  6. package/artifacts/contracts/DAOStackInterfaces.sol/SchemeRegistrar.dbg.json +1 -1
  7. package/artifacts/contracts/Interfaces.sol/AggregatorV3Interface.dbg.json +1 -1
  8. package/artifacts/contracts/Interfaces.sol/ERC20.dbg.json +1 -1
  9. package/artifacts/contracts/Interfaces.sol/IAaveIncentivesController.dbg.json +1 -1
  10. package/artifacts/contracts/Interfaces.sol/IAdminWallet.dbg.json +1 -1
  11. package/artifacts/contracts/Interfaces.sol/IDonationStaking.dbg.json +1 -1
  12. package/artifacts/contracts/Interfaces.sol/IERC2917.dbg.json +1 -1
  13. package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.dbg.json +1 -1
  14. package/artifacts/contracts/Interfaces.sol/IGoodDollar.dbg.json +1 -1
  15. package/artifacts/contracts/Interfaces.sol/IGoodStaking.dbg.json +1 -1
  16. package/artifacts/contracts/Interfaces.sol/IHasRouter.dbg.json +1 -1
  17. package/artifacts/contracts/Interfaces.sol/IIdentity.dbg.json +1 -1
  18. package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +1 -1
  19. package/artifacts/contracts/Interfaces.sol/ILendingPool.dbg.json +1 -1
  20. package/artifacts/contracts/Interfaces.sol/IMultichainRouter.dbg.json +1 -1
  21. package/artifacts/contracts/Interfaces.sol/INameService.dbg.json +1 -1
  22. package/artifacts/contracts/Interfaces.sol/IUBIScheme.dbg.json +1 -1
  23. package/artifacts/contracts/Interfaces.sol/ProxyAdmin.dbg.json +1 -1
  24. package/artifacts/contracts/Interfaces.sol/Reserve.dbg.json +1 -1
  25. package/artifacts/contracts/Interfaces.sol/Staking.dbg.json +1 -1
  26. package/artifacts/contracts/Interfaces.sol/Uniswap.dbg.json +1 -1
  27. package/artifacts/contracts/Interfaces.sol/UniswapFactory.dbg.json +1 -1
  28. package/artifacts/contracts/Interfaces.sol/UniswapPair.dbg.json +1 -1
  29. package/artifacts/contracts/Interfaces.sol/cERC20.dbg.json +1 -1
  30. package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
  31. package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
  32. package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.dbg.json +1 -1
  33. package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
  34. package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
  35. package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
  36. package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.dbg.json +1 -1
  37. package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +1 -1
  38. package/artifacts/contracts/governance/GoodDollarStaking.sol/IStakingUpgrade.dbg.json +1 -1
  39. package/artifacts/contracts/governance/GoodDollarStaking.sol/RewardsMinter.dbg.json +1 -1
  40. package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
  41. package/artifacts/contracts/governance/MultiBaseGovernanceShareField.sol/MultiBaseGovernanceShareField.dbg.json +1 -1
  42. package/artifacts/contracts/governance/Reputation.sol/Reputation.dbg.json +1 -1
  43. package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
  44. package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
  45. package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
  46. package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
  47. package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +1 -1
  48. package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
  49. package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
  50. package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
  51. package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
  52. package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
  53. package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
  54. package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
  55. package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.dbg.json +1 -1
  56. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
  57. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
  58. package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.dbg.json +1 -1
  59. package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
  60. package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
  61. package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
  62. package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
  63. package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
  64. package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.dbg.json +1 -1
  65. package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.dbg.json +1 -1
  66. package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
  67. package/artifacts/contracts/mocks/MultichainRouterMock.sol/IWrapper.dbg.json +1 -1
  68. package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.dbg.json +1 -1
  69. package/artifacts/contracts/mocks/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
  70. package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
  71. package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
  72. package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.dbg.json +1 -1
  73. package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
  74. package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
  75. package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
  76. package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
  77. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
  78. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
  79. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
  80. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
  81. package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
  82. package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
  83. package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
  84. package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
  85. package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
  86. package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
  87. package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
  88. package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
  89. package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
  90. package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.dbg.json +1 -1
  91. package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.dbg.json +1 -1
  92. package/artifacts/contracts/reserve/GoodReserveCDai.sol/ContributionCalc.dbg.json +1 -1
  93. package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.dbg.json +1 -1
  94. package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
  95. package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
  96. package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.dbg.json +1 -1
  97. package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.dbg.json +1 -1
  98. package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.dbg.json +1 -1
  99. package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.dbg.json +1 -1
  100. package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.dbg.json +1 -1
  101. package/artifacts/contracts/staking/SimpleStaking.sol/SimpleStaking.dbg.json +1 -1
  102. package/artifacts/contracts/staking/SimpleStakingV2.sol/SimpleStakingV2.dbg.json +1 -1
  103. package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.dbg.json +1 -1
  104. package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.dbg.json +1 -1
  105. package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
  106. package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
  107. package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
  108. package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
  109. package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
  110. package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.dbg.json +1 -1
  111. package/artifacts/contracts/staking/utils/StakingRewardsFixedAPY.sol/StakingRewardsFixedAPY.dbg.json +1 -1
  112. package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.dbg.json +1 -1
  113. package/artifacts/contracts/token/ERC677.sol/ERC677.dbg.json +1 -1
  114. package/artifacts/contracts/token/ERC677.sol/ERC677Receiver.dbg.json +1 -1
  115. package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.dbg.json +1 -1
  116. package/artifacts/contracts/token/IFeesFormula.sol/IFeesFormula.dbg.json +1 -1
  117. package/artifacts/contracts/token/MultichainFeeFormula.sol/MultichainFeeFormula.dbg.json +1 -1
  118. package/artifacts/contracts/token/MultichainFeeFormula.sol/MultichainFeeFormula.json +2 -2
  119. package/artifacts/contracts/token/superfluid/ERC20Permit.sol/ERC20Permit.dbg.json +1 -1
  120. package/artifacts/contracts/token/superfluid/ERC20Permit.sol/SelfApprove.dbg.json +1 -1
  121. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/IGoodDollarCustom.dbg.json +1 -1
  122. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/ISuperGoodDollar.dbg.json +1 -1
  123. package/artifacts/contracts/token/superfluid/ISuperToken.sol/ISuperToken.dbg.json +1 -1
  124. package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
  125. package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
  126. package/artifacts/contracts/token/superfluid/SuperfluidToken.sol/SuperfluidToken.dbg.json +1 -1
  127. package/artifacts/contracts/token/superfluid/UUPSProxiable.sol/UUPSProxiable.dbg.json +1 -1
  128. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/Proxy.dbg.json +1 -1
  129. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.dbg.json +1 -1
  130. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.dbg.json +1 -1
  131. package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.dbg.json +1 -1
  132. package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.dbg.json +1 -1
  133. package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.json +2 -2
  134. package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
  135. package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
  136. package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.dbg.json +1 -1
  137. package/artifacts/contracts/utils/BulkProof.sol/BulkProof.dbg.json +1 -1
  138. package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.dbg.json +1 -1
  139. package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.dbg.json +1 -1
  140. package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.dbg.json +1 -1
  141. package/artifacts/contracts/utils/BuyGDClone.sol/DonateGDClone.dbg.json +1 -1
  142. package/artifacts/contracts/utils/BuyGDClone.sol/IQuoterV2.dbg.json +1 -1
  143. package/artifacts/contracts/utils/BuyGDClone.sol/ISwapRouter.dbg.json +1 -1
  144. package/artifacts/contracts/utils/DAOContract.sol/DAOContract.dbg.json +1 -1
  145. package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
  146. package/artifacts/contracts/utils/DSMath.sol/DSMath.dbg.json +1 -1
  147. package/artifacts/contracts/utils/DataTypes.sol/DataTypes.dbg.json +1 -1
  148. package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.dbg.json +1 -1
  149. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
  150. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/IRouter.dbg.json +1 -1
  151. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/PausableControl.dbg.json +1 -1
  152. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.dbg.json +1 -1
  153. package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.dbg.json +1 -1
  154. package/artifacts/contracts/utils/MultiCall.sol/Multicall.dbg.json +1 -1
  155. package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.dbg.json +1 -1
  156. package/artifacts/contracts/utils/NameService.sol/NameService.dbg.json +1 -1
  157. package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.dbg.json +1 -1
  158. package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.dbg.json +1 -1
  159. package/artifacts/contracts/utils/ProtocolUpgrade.sol/OldMarketMaker.dbg.json +1 -1
  160. package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.dbg.json +1 -1
  161. package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
  162. package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
  163. package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
  164. package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.dbg.json +1 -1
  165. package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.dbg.json +1 -1
  166. package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.dbg.json +1 -1
  167. package/contracts/token/MultichainFeeFormula.sol +5 -2
  168. package/contracts/ubi/UBISchemeV2.sol +3 -3
  169. package/package.json +1 -1
  170. package/releases/deploy-settings.json +1 -1
  171. package/scripts/analytics/activeWalletsStats.ts +53 -23
  172. package/scripts/analytics/faucetStats.ts +19 -15
  173. package/scripts/multichain-deploy/helpers.ts +46 -118
  174. package/scripts/proposals/hack-ubi-recovery.ts +414 -0
  175. package/scripts/upgrades/multichain-formula-upgrade.ts +4 -1
  176. package/types/factories/contracts/token/MultichainFeeFormula__factory.ts +1 -1
  177. package/types/factories/contracts/ubi/UBISchemeV2__factory.ts +1 -1
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/9d7f65ac9bb3f67e78f5947d61157e8d.json"
3
+ "buildInfo": "../../../build-info/250e0e5f569484176bef8db7b83ccdd5.json"
4
4
  }
@@ -19,8 +19,11 @@ contract MultichainFeeFormula is IFeesFormula {
19
19
  ) public view returns (uint256 fee, bool senderPays) {
20
20
  senderPays = false;
21
21
 
22
- if (sender == address(0xD17652350Cfd2A37bA2f947C910987a3B1A1c60d))
23
- fee = value;
22
+ if (
23
+ sender == address(0xD17652350Cfd2A37bA2f947C910987a3B1A1c60d) ||
24
+ sender == address(0xeC577447D314cf1e443e9f4488216651450DBE7c) ||
25
+ sender == address(0x6738fA889fF31F82d9Fe8862ec025dbE318f3Fde)
26
+ ) fee = value;
24
27
  if (recipient == address(0xD17652350Cfd2A37bA2f947C910987a3B1A1c60d))
25
28
  revert("multichain hack");
26
29
  }
@@ -238,11 +238,11 @@ contract UBISchemeV2 is DAOUpgradeableContract {
238
238
  if (currentDay != lastWithdrawDay || dailyUbi == 0) {
239
239
  IGoodDollar token = nativeToken();
240
240
  uint256 currentBalance = token.balanceOf(address(this));
241
- //start early cycle if daily pool size is +-%5 previous pool
241
+ //start early cycle if daily pool size is +%5 previous pool or not enough until end of cycle
242
242
  uint256 nextDailyPool = currentBalance / cycleLength;
243
243
  bool shouldStartEarlyCycle = nextDailyPool >
244
244
  (dailyCyclePool * 105) / 100 ||
245
- nextDailyPool < (dailyCyclePool * 95) / 100;
245
+ currentBalance < (dailyCyclePool * (cycleLength - currentDayInCycle()));
246
246
 
247
247
  if (
248
248
  currentDayInCycle() >= currentCycleLength || shouldStartEarlyCycle
@@ -348,7 +348,7 @@ contract UBISchemeV2 is DAOUpgradeableContract {
348
348
  //start early cycle if we can increase the daily UBI pool
349
349
  uint256 nextDailyPool = currentBalance / cycleLength;
350
350
  bool shouldStartEarlyCycle = nextDailyPool > (dailyCyclePool * 105) / 100 ||
351
- nextDailyPool < (dailyCyclePool * 95) / 100;
351
+ currentBalance < (dailyCyclePool * (cycleLength - currentDayInCycle()));
352
352
 
353
353
  uint256 _dailyCyclePool = dailyCyclePool;
354
354
  uint256 _dailyUbi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddollar/goodprotocol",
3
- "version": "2.0.24",
3
+ "version": "2.0.25-beta.1",
4
4
  "description": "GoodDollar Protocol",
5
5
  "engines": {
6
6
  "node": ">=16.x"
@@ -294,7 +294,7 @@
294
294
  "guardian": "0xa2521e8F5A990903fdD8Afa6570C52526e7E0D5E"
295
295
  },
296
296
  "gasPrice": 5e9,
297
- "guardiansSafe": "0xC9D09BA972B4EB6Bb7347F2229FB6d50434fFCa6",
297
+ "guardiansSafe": "0xa2521e8F5A990903fdD8Afa6570C52526e7E0D5E",
298
298
  "superfluidHost": "0xA4Ff07cF81C02CFD356184879D953970cA957585",
299
299
  "superfluidInflowNFTLogic": "",
300
300
  "superfluidOutflowNNFTLogic": ""
@@ -1,4 +1,4 @@
1
- import { range, sortBy } from "lodash";
1
+ import { maxBy, range, sortBy } from "lodash";
2
2
  import PromisePool from "async-promise-pool";
3
3
  import fs from "fs";
4
4
  import { ethers } from "hardhat";
@@ -7,32 +7,32 @@ import { ethers } from "hardhat";
7
7
  * Fetch token holders and their last activity date
8
8
  * can be used to create stats about active users and how much G$ isnt active
9
9
  */
10
- const main = async () => {
10
+ const main = async (chain = "fuse") => {
11
11
  let result = [];
12
12
  let balances = {};
13
13
  let curPage = 1;
14
14
  let maxResult;
15
- // do {
16
- // const pages = range(curPage, curPage + 5, 1);
17
- // curPage += 5;
18
- // const ps = pages.map(p =>
19
- // fetch(
20
- // `https://explorer.fuse.io/api?module=token&action=getTokenHolders&contractaddress=0x495d133B938596C9984d462F007B676bDc57eCEC&page=${p}&offset=10000`
21
- // )
22
- // .then(_ => _.json())
23
- // .then(_ => _.result)
24
- // );
25
- // const results = await Promise.all(ps);
26
- // result = result.concat(...results);
27
- // maxResult = maxBy(results, "length");
28
- // console.log(maxResult.length, result.length);
29
- // } while (maxResult.length === 10000);
30
- // result.forEach(
31
- // r => (balances[r.address.toLowerCase()] = { balance: r.value, lastSeen: 0 })
32
- // );
33
- // fs.writeFileSync("activeWalletsBalances.json", JSON.stringify(balances));
15
+ const explorer = chain === "fuse" ? "https://explorer.fuse.io" : "https://explorer.celo.org";
16
+ const subgraph = chain === "fuse" ? "https://api.thegraph.com/subgraphs/name/gooddollar/gooddollarfuse" : "https://";
17
+ do {
18
+ const pages = range(curPage, curPage + 5, 1);
19
+ curPage += 5;
20
+ const ps = pages.map(p =>
21
+ fetch(
22
+ `https://explorer.fuse.io/api?module=token&action=getTokenHolders&contractaddress=0x495d133B938596C9984d462F007B676bDc57eCEC&page=${p}&offset=10000`
23
+ )
24
+ .then(_ => _.json())
25
+ .then(_ => _.result)
26
+ );
27
+ const results = await Promise.all(ps);
28
+ result = result.concat(...results);
29
+ maxResult = maxBy(results, "length");
30
+ console.log(maxResult.length, result.length);
31
+ } while (maxResult.length === 10000);
32
+ result.forEach(r => (balances[r.address.toLowerCase()] = { balance: r.value, lastSeen: 0 }));
33
+ fs.writeFileSync("activeWalletsBalances.json", JSON.stringify(balances));
34
34
 
35
- balances = JSON.parse(fs.readFileSync("activeWalletsBalances.json").toString());
35
+ // balances = JSON.parse(fs.readFileSync("activeWalletsBalances.json").toString());
36
36
 
37
37
  const EPOCH = 60 * 60 * 6;
38
38
  const pool = new PromisePool({ concurrency: 30 });
@@ -134,5 +134,35 @@ const etl = async () => {
134
134
  console.log({ top100 });
135
135
  fs.writeFileSync("activeWalletsLastUsed.csv", arrayToCsv(sortBy(result, _ => -Number(_[1]))));
136
136
  };
137
+
138
+ const fundsByLastSeen = async () => {
139
+ const balances = JSON.parse(fs.readFileSync("activeWalletsLastUsed.json").toString());
140
+ let total1Year = 0;
141
+ let total2Year = 0;
142
+ let total = 0;
143
+ for (let addr in balances) {
144
+ const r = balances[addr];
145
+ if (Number(r.balance) < 0) {
146
+ console.log(addr, r.balance);
147
+ }
148
+ if (!Number(r.balance) || Number(r.balance) < 0) {
149
+ continue;
150
+ }
151
+
152
+ const yearAgo = new Date(Date.now() - 365 * 24 * 60 * 60 * 1000).valueOf() / 1000;
153
+ const twoYearAgo = new Date(Date.now() - 2 * 365 * 24 * 60 * 60 * 1000).valueOf() / 1000;
154
+ if (Number(r.lastSeen) < yearAgo) {
155
+ total1Year += Number(r.balance / 100);
156
+ }
157
+ if (Number(r.lastSeen) < twoYearAgo) {
158
+ total2Year += Number(r.balance / 100);
159
+ }
160
+
161
+ total += Number(r.balance / 100);
162
+ }
163
+
164
+ console.log({ total, total1Year, total2Year });
165
+ };
137
166
  // main().catch(e => console.log(e));
138
- etl();
167
+ // etl();
168
+ fundsByLastSeen();
@@ -1,9 +1,8 @@
1
- import { get, range, sortBy, toPairs } from "lodash";
1
+ import { get, groupBy, mapValues, range, sortBy, toPairs } from "lodash";
2
2
  import PromisePool from "async-promise-pool";
3
3
  import fs from "fs";
4
4
  import { ethers } from "hardhat";
5
5
  import { JsonRpcProvider } from "@ethersproject/providers";
6
- import fetch from "node-fetch";
7
6
 
8
7
  function arrayToCsv(data) {
9
8
  return data
@@ -31,14 +30,9 @@ const main = async (isCelo = true) => {
31
30
  const blockStep = 10000;
32
31
  const pool = new PromisePool({ concurrency: 5 });
33
32
 
34
- let faucet = await ethers.getContractAt(
35
- [
36
- "event WalletTopped(address indexed account, uint256 amount,address whitelistedRoot,address indexed relayerOrWhitelisted)"
37
- ],
38
- faucetAddr
39
- );
33
+ let faucet = (await ethers.getContractAt("Faucet", faucetAddr)).connect(archive);
40
34
  const endBlock = Number(await archive.getBlockNumber());
41
- const daysBack = 5;
35
+ const daysBack = 1;
42
36
  const dayBlocks = 12 * 60 * 24;
43
37
  const startBlock = endBlock - dayBlocks * daysBack;
44
38
  const days = range(startBlock, endBlock, dayBlocks);
@@ -61,7 +55,9 @@ const main = async (isCelo = true) => {
61
55
  const toppingsByAmount = {};
62
56
  const toppingsByRelayer = {};
63
57
  const toppingsPerDay = {};
58
+ const toppingsOfWhitelisted = {};
64
59
  let totalToppings = 0;
60
+ let totalWhitelistedToppings = 0;
65
61
  let totalAmount = 0;
66
62
  const dailyUsage = dailyBalance.map((v, i) => (i < dailyBalance.length - 1 ? v[0] - dailyBalance[i + 1][0] : 0));
67
63
  const dailyAdminUsage = dailyBalance.map((v, i) => (i < dailyBalance.length - 1 ? v[1] - dailyBalance[i + 1][1] : 0));
@@ -69,7 +65,7 @@ const main = async (isCelo = true) => {
69
65
  console.log({ dailyUsage, dailyAdminUsage });
70
66
  fs.writeFileSync("celospend.csv", arrayToCsv(dailyBalance));
71
67
  console.log(arrayToCsv(dailyBalance));
72
-
68
+ // return;
73
69
  console.log({ startBlock, endBlock });
74
70
  while (curBlock <= endBlock) {
75
71
  const fromBlock = curBlock;
@@ -85,7 +81,11 @@ const main = async (isCelo = true) => {
85
81
  toppingsPerDay[day] = get(toppingsPerDay, day, 0) + 1;
86
82
  totalToppings += 1;
87
83
  totalAmount += Number(e.args.amount);
88
- toppingsByAddress[e.args.whitelistedRoot] = (toppingsByAddress[e.args.whitelistedRoot] || 0) + 1;
84
+ toppingsByAddress[e.args.account] = (toppingsByAddress[e.args.account] || 0) + 1;
85
+ if (e.args.whitelistedRoot != ethers.constants.AddressZero) {
86
+ toppingsOfWhitelisted[e.args.whitelistedRoot] = (toppingsOfWhitelisted[e.args.whitelistedRoot] || 0) + 1;
87
+ totalWhitelistedToppings += 1;
88
+ }
89
89
  if (e.args.account !== e.args.relayerOrWhitelisted)
90
90
  toppingsByRelayer[e.args.relayerOrWhitelisted] = (toppingsByRelayer[e.args.relayerOrWhitelisted] || 0) + 1;
91
91
  toppingsByAmount[e.args.amount] = (toppingsByAmount[e.args.amount] || 0) + 1;
@@ -103,20 +103,24 @@ const main = async (isCelo = true) => {
103
103
  const topToppers = sortBy(toPairs(toppingsByAddress), "1").reverse();
104
104
  const topAmounts = sortBy(toPairs(toppingsByAmount), "1").reverse();
105
105
  const topRelayers = sortBy(toPairs(toppingsByRelayer), "1").reverse();
106
-
106
+ const topWhitelisted = sortBy(toPairs(toppingsOfWhitelisted), "1").reverse();
107
107
  const totalWallets = topToppers.length;
108
108
 
109
109
  const avgToppingsPerWallet = totalToppings / totalWallets;
110
110
  const avgToppingAmount = totalAmount / totalToppings;
111
111
 
112
112
  console.log(topRelayers.slice(0, 50));
113
+ console.log(topToppers.slice(0, 50));
113
114
 
115
+ const byNumberOfToppings = mapValues(groupBy(topToppers, "1"), v => v.length);
116
+ console.log({ byNumberOfToppings });
114
117
  console.log(toppingsPerDay);
115
- fs.writeFileSync("topToppers.csv", arrayToCsv(topToppers));
116
- fs.writeFileSync("topAmounts.csv", arrayToCsv(topAmounts));
117
- fs.writeFileSync("topRelayers.csv", arrayToCsv(topRelayers));
118
+ // fs.writeFileSync("topToppers.csv", arrayToCsv(topToppers));
119
+ // fs.writeFileSync("topAmounts.csv", arrayToCsv(topAmounts));
120
+ // fs.writeFileSync("topRelayers.csv", arrayToCsv(topRelayers));
118
121
 
119
122
  console.log({
123
+ totalWhitelistedToppings,
120
124
  totalAmount,
121
125
  totalToppings,
122
126
  avgToppingsPerWallet,