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

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 (189) hide show
  1. package/artifacts/abis/Faucet.min.json +1 -1
  2. package/artifacts/abis/FuseFaucetV2.min.json +1 -1
  3. package/artifacts/abis/IdentityFix.min.json +1 -0
  4. package/artifacts/abis/IdentityV2.min.json +1 -1
  5. package/artifacts/abis/UBISchemeV2.min.json +1 -0
  6. package/artifacts/contracts/DAOStackInterfaces.sol/Avatar.dbg.json +1 -1
  7. package/artifacts/contracts/DAOStackInterfaces.sol/Controller.dbg.json +1 -1
  8. package/artifacts/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface.dbg.json +1 -1
  9. package/artifacts/contracts/DAOStackInterfaces.sol/IntVoteInterface.dbg.json +1 -1
  10. package/artifacts/contracts/DAOStackInterfaces.sol/ReputationInterface.dbg.json +1 -1
  11. package/artifacts/contracts/DAOStackInterfaces.sol/SchemeRegistrar.dbg.json +1 -1
  12. package/artifacts/contracts/Interfaces.sol/AggregatorV3Interface.dbg.json +1 -1
  13. package/artifacts/contracts/Interfaces.sol/ERC20.dbg.json +1 -1
  14. package/artifacts/contracts/Interfaces.sol/IAaveIncentivesController.dbg.json +1 -1
  15. package/artifacts/contracts/Interfaces.sol/IAdminWallet.dbg.json +1 -1
  16. package/artifacts/contracts/Interfaces.sol/IDonationStaking.dbg.json +1 -1
  17. package/artifacts/contracts/Interfaces.sol/IERC2917.dbg.json +1 -1
  18. package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.dbg.json +1 -1
  19. package/artifacts/contracts/Interfaces.sol/IGoodDollar.dbg.json +1 -1
  20. package/artifacts/contracts/Interfaces.sol/IGoodStaking.dbg.json +1 -1
  21. package/artifacts/contracts/Interfaces.sol/IHasRouter.dbg.json +1 -1
  22. package/artifacts/contracts/Interfaces.sol/IIdentity.dbg.json +1 -1
  23. package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +1 -1
  24. package/artifacts/contracts/Interfaces.sol/ILendingPool.dbg.json +1 -1
  25. package/artifacts/contracts/Interfaces.sol/IMultichainRouter.dbg.json +1 -1
  26. package/artifacts/contracts/Interfaces.sol/INameService.dbg.json +1 -1
  27. package/artifacts/contracts/Interfaces.sol/IUBIScheme.dbg.json +1 -1
  28. package/artifacts/contracts/Interfaces.sol/ProxyAdmin.dbg.json +1 -1
  29. package/artifacts/contracts/Interfaces.sol/Reserve.dbg.json +1 -1
  30. package/artifacts/contracts/Interfaces.sol/Staking.dbg.json +1 -1
  31. package/artifacts/contracts/Interfaces.sol/Uniswap.dbg.json +1 -1
  32. package/artifacts/contracts/Interfaces.sol/UniswapFactory.dbg.json +1 -1
  33. package/artifacts/contracts/Interfaces.sol/UniswapPair.dbg.json +1 -1
  34. package/artifacts/contracts/Interfaces.sol/cERC20.dbg.json +1 -1
  35. package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
  36. package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.json +28 -9
  37. package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
  38. package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.dbg.json +1 -1
  39. package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.json +28 -2
  40. package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
  41. package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
  42. package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
  43. package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.dbg.json +1 -1
  44. package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +1 -1
  45. package/artifacts/contracts/governance/GoodDollarStaking.sol/IStakingUpgrade.dbg.json +1 -1
  46. package/artifacts/contracts/governance/GoodDollarStaking.sol/RewardsMinter.dbg.json +1 -1
  47. package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
  48. package/artifacts/contracts/governance/MultiBaseGovernanceShareField.sol/MultiBaseGovernanceShareField.dbg.json +1 -1
  49. package/artifacts/contracts/governance/Reputation.sol/Reputation.dbg.json +1 -1
  50. package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
  51. package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
  52. package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.json +20 -2
  53. package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
  54. package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
  55. package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +1 -1
  56. package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
  57. package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
  58. package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
  59. package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
  60. package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
  61. package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
  62. package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
  63. package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.dbg.json +1 -1
  64. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
  65. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
  66. package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.dbg.json +1 -1
  67. package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
  68. package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
  69. package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
  70. package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
  71. package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
  72. package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.dbg.json +1 -1
  73. package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.dbg.json +1 -1
  74. package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
  75. package/artifacts/contracts/mocks/MultichainRouterMock.sol/IWrapper.dbg.json +1 -1
  76. package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.dbg.json +1 -1
  77. package/artifacts/contracts/mocks/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
  78. package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
  79. package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
  80. package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.dbg.json +1 -1
  81. package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
  82. package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
  83. package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
  84. package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
  85. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
  86. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
  87. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
  88. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
  89. package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
  90. package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
  91. package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
  92. package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
  93. package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
  94. package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
  95. package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
  96. package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
  97. package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
  98. package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.dbg.json +1 -1
  99. package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.dbg.json +1 -1
  100. package/artifacts/contracts/reserve/GoodReserveCDai.sol/ContributionCalc.dbg.json +1 -1
  101. package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.dbg.json +1 -1
  102. package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
  103. package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
  104. package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.dbg.json +1 -1
  105. package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.dbg.json +1 -1
  106. package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.dbg.json +1 -1
  107. package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.dbg.json +1 -1
  108. package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.dbg.json +1 -1
  109. package/artifacts/contracts/staking/SimpleStaking.sol/SimpleStaking.dbg.json +1 -1
  110. package/artifacts/contracts/staking/SimpleStakingV2.sol/SimpleStakingV2.dbg.json +1 -1
  111. package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.dbg.json +1 -1
  112. package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.dbg.json +1 -1
  113. package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
  114. package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
  115. package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
  116. package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
  117. package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
  118. package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.dbg.json +1 -1
  119. package/artifacts/contracts/staking/utils/StakingRewardsFixedAPY.sol/StakingRewardsFixedAPY.dbg.json +1 -1
  120. package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.dbg.json +1 -1
  121. package/artifacts/contracts/token/ERC677.sol/ERC677.dbg.json +1 -1
  122. package/artifacts/contracts/token/ERC677.sol/ERC677Receiver.dbg.json +1 -1
  123. package/artifacts/contracts/token/FeesFormula.sol/IFeesFormula.dbg.json +1 -1
  124. package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.dbg.json +1 -1
  125. package/artifacts/contracts/token/superfluid/ERC20Permit.sol/ERC20Permit.dbg.json +1 -1
  126. package/artifacts/contracts/token/superfluid/ERC20Permit.sol/SelfApprove.dbg.json +1 -1
  127. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/IGoodDollarCustom.dbg.json +1 -1
  128. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/ISuperGoodDollar.dbg.json +1 -1
  129. package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
  130. package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
  131. package/artifacts/contracts/token/superfluid/SuperfluidToken.sol/SuperfluidToken.dbg.json +1 -1
  132. package/artifacts/contracts/token/superfluid/UUPSProxiable.sol/UUPSProxiable.dbg.json +1 -1
  133. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/Proxy.dbg.json +1 -1
  134. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.dbg.json +1 -1
  135. package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.dbg.json +1 -1
  136. package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.dbg.json +1 -1
  137. package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.dbg.json +4 -0
  138. package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.json +789 -0
  139. package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
  140. package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
  141. package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.dbg.json +1 -1
  142. package/artifacts/contracts/utils/BulkProof.sol/BulkProof.dbg.json +1 -1
  143. package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.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/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
  149. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/IRouter.dbg.json +1 -1
  150. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/PausableControl.dbg.json +1 -1
  151. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.dbg.json +1 -1
  152. package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.dbg.json +4 -0
  153. package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.json +60 -0
  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/fuseFaucet/Faucet.sol +9 -8
  168. package/contracts/fuseFaucet/FuseFaucetV2.sol +16 -9
  169. package/contracts/identity/IdentityV2.sol +52 -61
  170. package/contracts/ubi/UBISchemeV2.sol +470 -0
  171. package/contracts/utils/IdentityFix.sol +31 -0
  172. package/package.json +1 -1
  173. package/scripts/analytics/activeUsersCount.ts +56 -18
  174. package/scripts/analytics/whitelistsyncIssue.ts +87 -0
  175. package/scripts/multichain-deploy/helpers.ts +8 -6
  176. package/scripts/proposals/gip-14_1.ts +5 -9
  177. package/test/faucet/Faucet.test.ts +166 -130
  178. package/types/Faucet.ts +50 -21
  179. package/types/FuseFaucetV2.ts +50 -0
  180. package/types/IdentityFix.ts +141 -0
  181. package/types/IdentityV2.ts +39 -0
  182. package/types/UBISchemeV2.ts +1192 -0
  183. package/types/factories/Faucet__factory.ts +27 -8
  184. package/types/factories/FuseFaucetV2__factory.ts +27 -1
  185. package/types/factories/IdentityFix__factory.ts +110 -0
  186. package/types/factories/IdentityV2__factory.ts +19 -1
  187. package/types/factories/UBISchemeV2__factory.ts +837 -0
  188. package/types/hardhat.d.ts +18 -0
  189. package/types/index.ts +4 -0
@@ -159,7 +159,8 @@ export const executeViaGuardian = async (
159
159
  results.push(tx);
160
160
  } else {
161
161
  const simulationResult = await ctrl.callStatic.genericCall(contract, encoded, release.Avatar, ethValues[i], {
162
- from: await guardian.getAddress()
162
+ from: await guardian.getAddress(),
163
+ value: ethValues[i]
163
164
  });
164
165
  console.log("executing genericCall:", {
165
166
  sigHash,
@@ -211,7 +212,7 @@ export const executeViaSafe = async (
211
212
  safeSigner = safeSignerOrNetwork as any;
212
213
  }
213
214
  const chainId = await safeSigner.getChainId();
214
- console.log("safeSigner:", safeSigner.address, { chainId });
215
+ console.log("safeSigner:", safeSigner.address, { chainId, safeAddress });
215
216
  let txServiceUrl;
216
217
  switch (chainId) {
217
218
  case 1:
@@ -251,7 +252,7 @@ export const executeViaSafe = async (
251
252
  const encoded = ethers.utils.solidityPack(["bytes4", "bytes"], [sigHash, functionInputs[i]]);
252
253
  if (contract === ctrl.address) {
253
254
  const simulationResult =
254
- isSimulation === false &&
255
+ isSimulation === true &&
255
256
  (await ctrl.callStatic[functionSigs[i]](...functionInputs[i], {
256
257
  from: safeAddress,
257
258
  value: ethValues[i]
@@ -276,15 +277,16 @@ export const executeViaSafe = async (
276
277
  });
277
278
 
278
279
  const simulationResult =
279
- isSimulation === false &&
280
+ isSimulation === true &&
280
281
  (await ctrl.callStatic.genericCall(contract, encoded, release.Avatar, ethValues[i], {
281
- from: safeAddress
282
+ from: safeAddress,
283
+ value: ethValues[i]
282
284
  }));
283
285
  console.log("executing genericCall simulation result:", {
284
286
  sigHash,
285
287
  simulationResult
286
288
  });
287
- if (isSimulation === false && simulationResult[0] === false) throw new Error("simulation failed:" + contract);
289
+ if (isSimulation === true && simulationResult[0] === false) throw new Error("simulation failed:" + contract);
288
290
  const genericEncode = ctrl.interface.encodeFunctionData("genericCall", [
289
291
  contract,
290
292
  encoded,
@@ -15,21 +15,19 @@ import ProtocolSettings from "../../releases/deploy-settings.json";
15
15
  import dao from "../../releases/deployment.json";
16
16
 
17
17
  const { name: networkName } = network;
18
+ const isForkSimulation = networkName === "localhost";
18
19
 
19
20
  export const step1 = async () => {
20
21
  const isProduction = networkName.includes("production");
21
22
  let [root, ...signers] = await ethers.getSigners();
22
23
 
23
- if (isProduction) verifyProductionSigner(root);
24
-
25
24
  let networkEnv = networkName.split("-")[0];
26
- const isForkSimulation = networkName === "localhost";
27
25
  if (isForkSimulation) networkEnv = "production";
28
26
  const fuseNetwork = networkEnv;
29
27
 
30
28
  if (networkEnv === "fuse") networkEnv = "development";
31
29
  const celoNetwork = networkEnv + "-celo";
32
- const mainnetNetwork = `${networkName === "localhost" ? "production" : networkName}-mainnet`; //simulate production on localhost requires running hardhat node in fork mode
30
+ const mainnetNetwork = `${networkName === "localhost" ? "production" : networkName.split("-")[0]}-mainnet`; //simulate production on localhost requires running hardhat node in fork mode
33
31
 
34
32
  let protocolSettings = defaultsDeep({}, ProtocolSettings[networkName], ProtocolSettings["default"]);
35
33
 
@@ -133,8 +131,6 @@ export const step2 = async () => {
133
131
  const isProduction = networkName.includes("production");
134
132
  let [root, ...signers] = await ethers.getSigners();
135
133
 
136
- if (isProduction) verifyProductionSigner(root);
137
-
138
134
  let networkEnv = networkName.split("-")[0];
139
135
  const isForkSimulation = networkName === "localhost";
140
136
  if (isForkSimulation) networkEnv = "production";
@@ -208,7 +204,7 @@ export const step2 = async () => {
208
204
  fuseProposalEthValues,
209
205
  fuseProposalFunctionSignatures,
210
206
  fuseProposalFunctionInputs,
211
- protocolSettings.guardiansSafe,
207
+ dao[fuseNetwork].GuardiansSafe,
212
208
  "fuse"
213
209
  );
214
210
  } else {
@@ -237,7 +233,7 @@ export const main = async () => {
237
233
  console.log("running step:", { stepNumber });
238
234
  switch (stepNumber) {
239
235
  case "1":
240
- await reset("https://cloudflare-eth.com");
236
+ isForkSimulation && (await reset("https://cloudflare-eth.com"));
241
237
  await step1();
242
238
  break;
243
239
 
@@ -245,7 +241,7 @@ export const main = async () => {
245
241
  //npx hardhat node --fork https://rpc.fuse.io
246
242
  //then run npx hardhat run scripts/proposals/gip-14_1.ts --network localhost
247
243
  case "2":
248
- await reset("https://rpc.fuse.io");
244
+ isForkSimulation && (await reset("https://rpc.fuse.io"));
249
245
  await step2();
250
246
  break;
251
247
  }
@@ -1,158 +1,194 @@
1
1
  import hre, { ethers, upgrades } from "hardhat";
2
2
  import { loadFixture } from "@nomicfoundation/hardhat-network-helpers";
3
3
  import { expect } from "chai";
4
- import { Faucet, IGoodDollar, IIdentity } from "../../types";
4
+ import { Faucet, FuseFaucetV2, IGoodDollar, IIdentity } from "../../types";
5
5
  import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/dist/src/signer-with-address";
6
6
  import { createDAO } from "../helpers";
7
7
 
8
8
  const BN = ethers.BigNumber;
9
-
10
- describe("Faucet", () => {
11
- let faucet: Faucet, founder: SignerWithAddress;
12
- let user1 = ethers.Wallet.createRandom().connect(ethers.provider);
13
- let user2 = ethers.Wallet.createRandom().connect(ethers.provider);
14
- let signers;
15
-
16
- let avatar, gd: IGoodDollar, Controller, id: IIdentity;
17
-
18
- before(async () => {
19
- [founder, ...signers] = await ethers.getSigners();
20
-
21
- const FuseFaucetF = await ethers.getContractFactory("Faucet");
22
-
23
- let { daoCreator, controller, avatar: av, gd: gooddollar, identity, nameService } = await loadFixture(createDAO);
24
-
25
- Controller = controller;
26
- avatar = av;
27
-
28
- // await daoCreator.setSchemes(
29
- // avatar,
30
- // [identity],
31
- // [ethers.constants.HashZero],
32
- // ["0x0000001F"],
33
- // ""
34
- // );
35
- //NameService _ns,
36
- // uint64 _gasPrice,
37
- // address relayer,
38
- // address owner
39
- faucet = (await upgrades.deployProxy(
40
- FuseFaucetF,
41
- [nameService.address, 1e10, signers[0].address, founder.address],
42
- {
43
- kind: "uups"
44
- }
45
- )) as Faucet;
46
-
47
- gd = (await ethers.getContractAt("IGoodDollar", gooddollar, founder)) as IGoodDollar;
48
- id = (await ethers.getContractAt("IIdentity", identity, founder)) as IIdentity;
49
-
50
- await founder.sendTransaction({
51
- value: ethers.utils.parseEther("1"),
52
- to: faucet.address
9
+ ["FuseFaucetV2", "Faucet"].forEach(factory => {
10
+ describe(factory, () => {
11
+ let faucet: FuseFaucetV2 | Faucet, founder: SignerWithAddress, fuseFaucet: FuseFaucetV2, faucets;
12
+ let user1 = ethers.Wallet.createRandom().connect(ethers.provider);
13
+ let user2 = ethers.Wallet.createRandom().connect(ethers.provider);
14
+ let signers;
15
+
16
+ let avatar, gd: IGoodDollar, Controller, id: IIdentity;
17
+
18
+ const cleanFixture = async () => {};
19
+ before(async () => {
20
+ [founder, ...signers] = await ethers.getSigners();
21
+
22
+ const FuseFaucetF = await ethers.getContractFactory(factory);
23
+
24
+ let { daoCreator, controller, avatar: av, gd: gooddollar, identity, nameService } = await loadFixture(createDAO);
25
+
26
+ Controller = controller;
27
+ avatar = av;
28
+
29
+ // await daoCreator.setSchemes(
30
+ // avatar,
31
+ // [identity],
32
+ // [ethers.constants.HashZero],
33
+ // ["0x0000001F"],
34
+ // ""
35
+ // );
36
+
37
+ // faucet = (await upgrades.deployProxy(
38
+ // FuseFaucetF,
39
+ // [nameService.address, 1e10, signers[0].address, founder.address],
40
+ // {
41
+ // kind: "uups"
42
+ // }
43
+ // )) as Faucet;
44
+
45
+ faucet = (await upgrades.deployProxy(
46
+ await ethers.getContractFactory("FuseFaucetV2"),
47
+ [nameService.address, 1e10, signers[0].address, 1000000],
48
+ {
49
+ kind: "transparent"
50
+ }
51
+ )) as FuseFaucetV2;
52
+
53
+ gd = (await ethers.getContractAt("IGoodDollar", gooddollar, founder)) as IGoodDollar;
54
+ id = (await ethers.getContractAt("IIdentity", identity, founder)) as IIdentity;
55
+
56
+ await founder.sendTransaction({
57
+ value: ethers.utils.parseEther("1"),
58
+ to: faucet.address
59
+ });
60
+ faucets = [fuseFaucet, faucet];
61
+ await loadFixture(cleanFixture);
53
62
  });
54
- });
55
63
 
56
- it("should have balance", async () => {
57
- const balance = await ethers.provider.getBalance(faucet.address);
58
- expect(balance).to.equal(ethers.utils.parseEther("1"));
59
- });
60
-
61
- it("should not unauthorized to top new user", async () => {
62
- expect(await faucet.canTop(user1.address)).to.true;
63
- await expect(faucet.topWallet(user1.address)).revertedWith("not authorized");
64
- });
64
+ it("should have balance", async () => {
65
+ const balance = await ethers.provider.getBalance(faucet.address);
66
+ expect(balance).to.equal(ethers.utils.parseEther("1"));
67
+ });
65
68
 
66
- it("should let new user top once", async () => {
67
- expect(await faucet.canTop(user1.address)).to.true;
68
- const tx = await (await faucet.connect(signers[0]).topWallet(user1.address)).wait();
69
- const balance = await ethers.provider.getBalance(user1.address);
70
- expect(balance).to.equal(await faucet.getToppingAmount());
71
- });
69
+ it("should not unauthorized to top new user", async () => {
70
+ expect(await faucet.canTop(user1.address)).to.true;
71
+ await expect(faucet.topWallet(user1.address)).revertedWith("not authorized");
72
+ });
72
73
 
73
- it("should not let new user top more than once", async () => {
74
- await user1.sendTransaction({
75
- to: ethers.constants.AddressZero,
76
- value: ethers.utils.parseUnits("400000", "gwei")
74
+ it("should let new user top once", async () => {
75
+ expect(await faucet.canTop(user1.address)).to.true;
76
+ const tx = await (await faucet.connect(signers[0]).topWallet(user1.address)).wait();
77
+ const balance = await ethers.provider.getBalance(user1.address);
78
+ expect(balance).to.equal(await faucet.getToppingAmount());
77
79
  });
78
- expect(await faucet.canTop(user1.address)).to.false;
79
- await expect(faucet.connect(signers[0]).topWallet(user1.address)).to.revertedWith(
80
- "User not whitelisted or not first time"
81
- );
82
- });
83
80
 
84
- it("should not refund gas when reverted", async () => {
85
- const balance = await ethers.provider.getBalance(founder.address);
86
- const faucetBalance = await ethers.provider.getBalance(faucet.address);
87
- expect(await faucet.canTop(user1.address)).to.false;
88
- await expect(faucet.topWallet(user1.address)).to.revertedWith("User not whitelisted or not first time");
89
- const balanceAfter = await ethers.provider.getBalance(founder.address);
90
- const faucetBalanceAfter = await ethers.provider.getBalance(faucet.address);
91
- expect(faucetBalanceAfter).to.eq(faucetBalance);
92
- expect(balanceAfter).to.lt(balance);
93
- });
81
+ it("should not let new user top more than once", async () => {
82
+ await user1.sendTransaction({
83
+ to: ethers.constants.AddressZero,
84
+ value: ethers.utils.parseUnits("400000", "gwei")
85
+ });
86
+ expect(await faucet.canTop(user1.address)).to.false;
87
+ await expect(faucet.connect(signers[0]).topWallet(user1.address)).to.revertedWith(
88
+ "User not whitelisted or not first time"
89
+ );
90
+ });
94
91
 
95
- it("should let user top again once identified", async () => {
96
- await id.addWhitelistedWithDID(user1.address, "did:1");
97
- expect(await faucet.canTop(user1.address)).to.true;
98
- const tx = await (await faucet.topWallet(user1.address)).wait();
99
- console.log(tx.gasUsed.toString());
100
- const balance = await ethers.provider.getBalance(user1.address);
101
- expect(balance).to.equal(await faucet.getToppingAmount());
102
- });
92
+ it("should not refund gas when reverted", async () => {
93
+ const balance = await ethers.provider.getBalance(founder.address);
94
+ const faucetBalance = await ethers.provider.getBalance(faucet.address);
95
+ expect(await faucet.canTop(user1.address)).to.false;
96
+ await expect(faucet.topWallet(user1.address)).to.revertedWith("User not whitelisted or not first time");
97
+ const balanceAfter = await ethers.provider.getBalance(founder.address);
98
+ const faucetBalanceAfter = await ethers.provider.getBalance(faucet.address);
99
+ expect(faucetBalanceAfter).to.eq(faucetBalance);
100
+ expect(balanceAfter).to.lt(balance);
101
+ });
103
102
 
104
- it("should not let identified user top over daily limit", async () => {
105
- await user1.sendTransaction({
106
- to: ethers.constants.AddressZero,
107
- value: ethers.utils.parseUnits("400000", "gwei")
103
+ it("should let user top again once identified", async () => {
104
+ await user1.sendTransaction({
105
+ to: ethers.constants.AddressZero,
106
+ value: (await ethers.provider.getBalance(user1.address)).sub(ethers.utils.parseUnits("100000", "gwei"))
107
+ });
108
+ await id.addWhitelistedWithDID(user1.address, "did:1");
109
+ expect(await faucet.canTop(user1.address)).to.true;
110
+ const tx = await (await faucet.topWallet(user1.address)).wait();
111
+ console.log(tx.gasUsed.toString());
112
+ const balance = await ethers.provider.getBalance(user1.address);
113
+ expect(balance).to.equal(await faucet.getToppingAmount());
108
114
  });
109
- const tx = await (await faucet.topWallet(user1.address)).wait();
110
- await user1.sendTransaction({
111
- to: ethers.constants.AddressZero,
112
- value: ethers.utils.parseUnits("400000", "gwei")
115
+
116
+ it("should not let identified user top over daily limit", async () => {
117
+ await user1.sendTransaction({
118
+ to: ethers.constants.AddressZero,
119
+ value: (await ethers.provider.getBalance(user1.address)).sub(ethers.utils.parseUnits("100000", "gwei"))
120
+ });
121
+ const tx = await (await faucet.topWallet(user1.address)).wait();
122
+ await user1.sendTransaction({
123
+ to: ethers.constants.AddressZero,
124
+ value: ethers.utils.parseUnits("400000", "gwei")
125
+ });
126
+ expect(await faucet.canTop(user1.address)).to.false;
127
+ await expect(faucet.topWallet(user1.address)).to.revertedWith("max daily toppings");
113
128
  });
114
- expect(await faucet.canTop(user1.address)).to.false;
115
- await expect(faucet.topWallet(user1.address)).to.revertedWith("max daily toppings");
116
- });
117
129
 
118
- // it("should not top if wallet not half empty", async () => {
119
- // expect(await faucet.canTop(founder.address)).to.false;
120
- // await expect(faucet.topWallet(founder.address)).to.revertedWith(
121
- // "User balance above minimum"
122
- // );
123
- // });
124
-
125
- it("should not let user top over weekly limit", async () => {
126
- const toppingAmount = await faucet.getToppingAmount();
127
- for (let i = 0; i < 5; i++) {
128
- await ethers.provider.send("evm_increaseTime", [60 * 60 * 24]);
129
- await (await faucet.topWallet(user1.address)).wait();
130
+ // it("should not top if wallet not half empty", async () => {
131
+ // expect(await faucet.canTop(founder.address)).to.false;
132
+ // await expect(faucet.topWallet(founder.address)).to.revertedWith(
133
+ // "User balance above minimum"
134
+ // );
135
+ // });
136
+
137
+ it("should not let user top over weekly limit", async () => {
138
+ const toppingAmount = await faucet.getToppingAmount();
130
139
  await user1.sendTransaction({
131
140
  to: ethers.constants.AddressZero,
132
141
  value: toppingAmount.mul(80).div(100)
133
142
  });
134
- }
135
- await ethers.provider.send("evm_increaseTime", [60 * 60 * 24]);
143
+ for (let i = 0; i < 2; i++) {
144
+ await ethers.provider.send("evm_increaseTime", [60 * 60 * 24]);
145
+ await (await faucet.topWallet(user1.address)).wait();
146
+ await user1.sendTransaction({
147
+ to: ethers.constants.AddressZero,
148
+ value: toppingAmount.mul(80).div(100)
149
+ });
150
+ console.log(toppingAmount.toString(), { i });
151
+ }
152
+ // await ethers.provider.send("evm_increaseTime", [60 * 60 * 24]);
136
153
 
137
- expect(await faucet.canTop(user1.address)).to.false;
138
- await expect(faucet.topWallet(user1.address)).to.revertedWith(
139
- "User wallet has been topped too many times this week"
140
- );
154
+ await expect(faucet.topWallet(user1.address)).to.revertedWith(
155
+ "User wallet has been topped too many times this week"
156
+ );
157
+ expect(await faucet.canTop(user1.address)).to.false;
141
158
 
142
- //should be able to top again after some days passed
143
- await ethers.provider.send("evm_increaseTime", [60 * 60 * 24 * 3]);
144
- await ethers.provider.send("evm_mine", []);
159
+ //should be able to top again after some days passed
160
+ await ethers.provider.send("evm_increaseTime", [60 * 60 * 24 * 5]);
161
+ await ethers.provider.send("evm_mine", []);
145
162
 
146
- expect(await faucet.canTop(user1.address)).to.true;
147
- });
163
+ expect(await faucet.canTop(user1.address)).to.true;
164
+ });
165
+
166
+ it("should not top below minTopping", async () => {
167
+ await id.addWhitelistedWithDID(user2.address, "did:2");
148
168
 
149
- it("should reimburse gas costs", async () => {
150
- const balance = await ethers.provider.getBalance(founder.address);
151
- const tx = await (await faucet.connect(signers[0]).topWallet(user2.address, { gasPrice: 1e9 })).wait();
152
- // const gasCosts = tx.gasUsed.mul(1e9);
153
- // const afterRefund = gasCosts.sub(await faucet["gasRefund()"]());
154
- const balanceAfter = await ethers.provider.getBalance(founder.address);
155
- const diff = balance.sub(balanceAfter).toNumber();
156
- expect(diff).to.lt(10000);
169
+ const toppingAmount = await faucet.getToppingAmount();
170
+ console.log(toppingAmount.toString(), "topping amount");
171
+ const minTopping = await faucet.minTopping();
172
+ const balance = await ethers.provider.getBalance(founder.address);
173
+ await founder.sendTransaction({ to: user2.address, value: toppingAmount.mul(100 - minTopping + 1).div(100) });
174
+
175
+ expect(await faucet.canTop(user2.address)).to.be.false;
176
+ await expect(faucet.topWallet(user2.address)).to.revertedWith("low toTop");
177
+ await user2.sendTransaction({ to: founder.address, value: toppingAmount.mul(2).div(100) });
178
+ expect(await faucet.canTop(user2.address)).to.be.true;
179
+ await expect(faucet.topWallet(user2.address)).not.reverted;
180
+ });
181
+
182
+ it("should reimburse gas costs", async () => {
183
+ const tempUser = ethers.Wallet.createRandom().connect(ethers.provider);
184
+
185
+ const balance = await ethers.provider.getBalance(founder.address);
186
+ const tx = await (await faucet.connect(signers[0]).topWallet(tempUser.address, { gasPrice: 1e9 })).wait();
187
+ // const gasCosts = tx.gasUsed.mul(1e9);
188
+ // const afterRefund = gasCosts.sub(await faucet["gasRefund()"]());
189
+ const balanceAfter = await ethers.provider.getBalance(founder.address);
190
+ const diff = balance.sub(balanceAfter).toNumber();
191
+ expect(diff).to.lt(10000);
192
+ });
157
193
  });
158
194
  });
package/types/Faucet.ts CHANGED
@@ -46,6 +46,7 @@ export interface FaucetInterface extends ethers.utils.Interface {
46
46
  "maxDailyToppings()": FunctionFragment;
47
47
  "maxPerWeekMultiplier()": FunctionFragment;
48
48
  "maxSwapAmount_unused()": FunctionFragment;
49
+ "minTopping()": FunctionFragment;
49
50
  "nameService()": FunctionFragment;
50
51
  "notFirstTime(address)": FunctionFragment;
51
52
  "onTokenTransfer(address,uint256,bytes)": FunctionFragment;
@@ -55,11 +56,11 @@ export interface FaucetInterface extends ethers.utils.Interface {
55
56
  "revokeRole(bytes32,address)": FunctionFragment;
56
57
  "setGasPrice(uint64)": FunctionFragment;
57
58
  "setGasTopping(uint256)": FunctionFragment;
59
+ "setMinTopping(uint8)": FunctionFragment;
58
60
  "startTime()": FunctionFragment;
59
61
  "supportsInterface(bytes4)": FunctionFragment;
60
62
  "topWallet(address)": FunctionFragment;
61
63
  "toppings(uint256,address)": FunctionFragment;
62
- "upgrade()": FunctionFragment;
63
64
  "upgradeTo(address)": FunctionFragment;
64
65
  "upgradeToAndCall(address,bytes)": FunctionFragment;
65
66
  "version()": FunctionFragment;
@@ -133,6 +134,10 @@ export interface FaucetInterface extends ethers.utils.Interface {
133
134
  functionFragment: "maxSwapAmount_unused",
134
135
  values?: undefined
135
136
  ): string;
137
+ encodeFunctionData(
138
+ functionFragment: "minTopping",
139
+ values?: undefined
140
+ ): string;
136
141
  encodeFunctionData(
137
142
  functionFragment: "nameService",
138
143
  values?: undefined
@@ -169,6 +174,10 @@ export interface FaucetInterface extends ethers.utils.Interface {
169
174
  functionFragment: "setGasTopping",
170
175
  values: [BigNumberish]
171
176
  ): string;
177
+ encodeFunctionData(
178
+ functionFragment: "setMinTopping",
179
+ values: [BigNumberish]
180
+ ): string;
172
181
  encodeFunctionData(functionFragment: "startTime", values?: undefined): string;
173
182
  encodeFunctionData(
174
183
  functionFragment: "supportsInterface",
@@ -179,7 +188,6 @@ export interface FaucetInterface extends ethers.utils.Interface {
179
188
  functionFragment: "toppings",
180
189
  values: [BigNumberish, string]
181
190
  ): string;
182
- encodeFunctionData(functionFragment: "upgrade", values?: undefined): string;
183
191
  encodeFunctionData(functionFragment: "upgradeTo", values: [string]): string;
184
192
  encodeFunctionData(
185
193
  functionFragment: "upgradeToAndCall",
@@ -240,6 +248,7 @@ export interface FaucetInterface extends ethers.utils.Interface {
240
248
  functionFragment: "maxSwapAmount_unused",
241
249
  data: BytesLike
242
250
  ): Result;
251
+ decodeFunctionResult(functionFragment: "minTopping", data: BytesLike): Result;
243
252
  decodeFunctionResult(
244
253
  functionFragment: "nameService",
245
254
  data: BytesLike
@@ -273,6 +282,10 @@ export interface FaucetInterface extends ethers.utils.Interface {
273
282
  functionFragment: "setGasTopping",
274
283
  data: BytesLike
275
284
  ): Result;
285
+ decodeFunctionResult(
286
+ functionFragment: "setMinTopping",
287
+ data: BytesLike
288
+ ): Result;
276
289
  decodeFunctionResult(functionFragment: "startTime", data: BytesLike): Result;
277
290
  decodeFunctionResult(
278
291
  functionFragment: "supportsInterface",
@@ -280,7 +293,6 @@ export interface FaucetInterface extends ethers.utils.Interface {
280
293
  ): Result;
281
294
  decodeFunctionResult(functionFragment: "topWallet", data: BytesLike): Result;
282
295
  decodeFunctionResult(functionFragment: "toppings", data: BytesLike): Result;
283
- decodeFunctionResult(functionFragment: "upgrade", data: BytesLike): Result;
284
296
  decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result;
285
297
  decodeFunctionResult(
286
298
  functionFragment: "upgradeToAndCall",
@@ -442,6 +454,8 @@ export interface Faucet extends BaseContract {
442
454
 
443
455
  maxSwapAmount_unused(overrides?: CallOverrides): Promise<[number]>;
444
456
 
457
+ minTopping(overrides?: CallOverrides): Promise<[number]>;
458
+
445
459
  nameService(overrides?: CallOverrides): Promise<[string]>;
446
460
 
447
461
  notFirstTime(arg0: string, overrides?: CallOverrides): Promise<[boolean]>;
@@ -479,6 +493,11 @@ export interface Faucet extends BaseContract {
479
493
  overrides?: Overrides & { from?: string | Promise<string> }
480
494
  ): Promise<ContractTransaction>;
481
495
 
496
+ setMinTopping(
497
+ _minTop: BigNumberish,
498
+ overrides?: Overrides & { from?: string | Promise<string> }
499
+ ): Promise<ContractTransaction>;
500
+
482
501
  startTime(overrides?: CallOverrides): Promise<[BigNumber]>;
483
502
 
484
503
  supportsInterface(
@@ -497,10 +516,6 @@ export interface Faucet extends BaseContract {
497
516
  overrides?: CallOverrides
498
517
  ): Promise<[BigNumber]>;
499
518
 
500
- upgrade(
501
- overrides?: Overrides & { from?: string | Promise<string> }
502
- ): Promise<ContractTransaction>;
503
-
504
519
  upgradeTo(
505
520
  newImplementation: string,
506
521
  overrides?: Overrides & { from?: string | Promise<string> }
@@ -577,6 +592,8 @@ export interface Faucet extends BaseContract {
577
592
 
578
593
  maxSwapAmount_unused(overrides?: CallOverrides): Promise<number>;
579
594
 
595
+ minTopping(overrides?: CallOverrides): Promise<number>;
596
+
580
597
  nameService(overrides?: CallOverrides): Promise<string>;
581
598
 
582
599
  notFirstTime(arg0: string, overrides?: CallOverrides): Promise<boolean>;
@@ -614,6 +631,11 @@ export interface Faucet extends BaseContract {
614
631
  overrides?: Overrides & { from?: string | Promise<string> }
615
632
  ): Promise<ContractTransaction>;
616
633
 
634
+ setMinTopping(
635
+ _minTop: BigNumberish,
636
+ overrides?: Overrides & { from?: string | Promise<string> }
637
+ ): Promise<ContractTransaction>;
638
+
617
639
  startTime(overrides?: CallOverrides): Promise<BigNumber>;
618
640
 
619
641
  supportsInterface(
@@ -632,10 +654,6 @@ export interface Faucet extends BaseContract {
632
654
  overrides?: CallOverrides
633
655
  ): Promise<BigNumber>;
634
656
 
635
- upgrade(
636
- overrides?: Overrides & { from?: string | Promise<string> }
637
- ): Promise<ContractTransaction>;
638
-
639
657
  upgradeTo(
640
658
  newImplementation: string,
641
659
  overrides?: Overrides & { from?: string | Promise<string> }
@@ -712,6 +730,8 @@ export interface Faucet extends BaseContract {
712
730
 
713
731
  maxSwapAmount_unused(overrides?: CallOverrides): Promise<number>;
714
732
 
733
+ minTopping(overrides?: CallOverrides): Promise<number>;
734
+
715
735
  nameService(overrides?: CallOverrides): Promise<string>;
716
736
 
717
737
  notFirstTime(arg0: string, overrides?: CallOverrides): Promise<boolean>;
@@ -746,6 +766,11 @@ export interface Faucet extends BaseContract {
746
766
  overrides?: CallOverrides
747
767
  ): Promise<void>;
748
768
 
769
+ setMinTopping(
770
+ _minTop: BigNumberish,
771
+ overrides?: CallOverrides
772
+ ): Promise<void>;
773
+
749
774
  startTime(overrides?: CallOverrides): Promise<BigNumber>;
750
775
 
751
776
  supportsInterface(
@@ -761,8 +786,6 @@ export interface Faucet extends BaseContract {
761
786
  overrides?: CallOverrides
762
787
  ): Promise<BigNumber>;
763
788
 
764
- upgrade(overrides?: CallOverrides): Promise<void>;
765
-
766
789
  upgradeTo(
767
790
  newImplementation: string,
768
791
  overrides?: CallOverrides
@@ -911,6 +934,8 @@ export interface Faucet extends BaseContract {
911
934
 
912
935
  maxSwapAmount_unused(overrides?: CallOverrides): Promise<BigNumber>;
913
936
 
937
+ minTopping(overrides?: CallOverrides): Promise<BigNumber>;
938
+
914
939
  nameService(overrides?: CallOverrides): Promise<BigNumber>;
915
940
 
916
941
  notFirstTime(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;
@@ -948,6 +973,11 @@ export interface Faucet extends BaseContract {
948
973
  overrides?: Overrides & { from?: string | Promise<string> }
949
974
  ): Promise<BigNumber>;
950
975
 
976
+ setMinTopping(
977
+ _minTop: BigNumberish,
978
+ overrides?: Overrides & { from?: string | Promise<string> }
979
+ ): Promise<BigNumber>;
980
+
951
981
  startTime(overrides?: CallOverrides): Promise<BigNumber>;
952
982
 
953
983
  supportsInterface(
@@ -966,10 +996,6 @@ export interface Faucet extends BaseContract {
966
996
  overrides?: CallOverrides
967
997
  ): Promise<BigNumber>;
968
998
 
969
- upgrade(
970
- overrides?: Overrides & { from?: string | Promise<string> }
971
- ): Promise<BigNumber>;
972
-
973
999
  upgradeTo(
974
1000
  newImplementation: string,
975
1001
  overrides?: Overrides & { from?: string | Promise<string> }
@@ -1055,6 +1081,8 @@ export interface Faucet extends BaseContract {
1055
1081
  overrides?: CallOverrides
1056
1082
  ): Promise<PopulatedTransaction>;
1057
1083
 
1084
+ minTopping(overrides?: CallOverrides): Promise<PopulatedTransaction>;
1085
+
1058
1086
  nameService(overrides?: CallOverrides): Promise<PopulatedTransaction>;
1059
1087
 
1060
1088
  notFirstTime(
@@ -1095,6 +1123,11 @@ export interface Faucet extends BaseContract {
1095
1123
  overrides?: Overrides & { from?: string | Promise<string> }
1096
1124
  ): Promise<PopulatedTransaction>;
1097
1125
 
1126
+ setMinTopping(
1127
+ _minTop: BigNumberish,
1128
+ overrides?: Overrides & { from?: string | Promise<string> }
1129
+ ): Promise<PopulatedTransaction>;
1130
+
1098
1131
  startTime(overrides?: CallOverrides): Promise<PopulatedTransaction>;
1099
1132
 
1100
1133
  supportsInterface(
@@ -1113,10 +1146,6 @@ export interface Faucet extends BaseContract {
1113
1146
  overrides?: CallOverrides
1114
1147
  ): Promise<PopulatedTransaction>;
1115
1148
 
1116
- upgrade(
1117
- overrides?: Overrides & { from?: string | Promise<string> }
1118
- ): Promise<PopulatedTransaction>;
1119
-
1120
1149
  upgradeTo(
1121
1150
  newImplementation: string,
1122
1151
  overrides?: Overrides & { from?: string | Promise<string> }