@gooddollar/goodprotocol 2.0.21 → 2.0.22-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/artifacts/abis/ISuperToken.min.json +1 -1
  2. package/artifacts/abis/SuperGoodDollar.min.json +1 -1
  3. package/artifacts/abis/SuperToken.min.json +1 -1
  4. package/artifacts/contracts/DAOStackInterfaces.sol/Avatar.dbg.json +1 -1
  5. package/artifacts/contracts/DAOStackInterfaces.sol/Controller.dbg.json +1 -1
  6. package/artifacts/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface.dbg.json +1 -1
  7. package/artifacts/contracts/DAOStackInterfaces.sol/IntVoteInterface.dbg.json +1 -1
  8. package/artifacts/contracts/DAOStackInterfaces.sol/ReputationInterface.dbg.json +1 -1
  9. package/artifacts/contracts/DAOStackInterfaces.sol/SchemeRegistrar.dbg.json +1 -1
  10. package/artifacts/contracts/Interfaces.sol/AggregatorV3Interface.dbg.json +1 -1
  11. package/artifacts/contracts/Interfaces.sol/ERC20.dbg.json +1 -1
  12. package/artifacts/contracts/Interfaces.sol/IAaveIncentivesController.dbg.json +1 -1
  13. package/artifacts/contracts/Interfaces.sol/IAdminWallet.dbg.json +1 -1
  14. package/artifacts/contracts/Interfaces.sol/IDonationStaking.dbg.json +1 -1
  15. package/artifacts/contracts/Interfaces.sol/IERC2917.dbg.json +1 -1
  16. package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.dbg.json +1 -1
  17. package/artifacts/contracts/Interfaces.sol/IGoodDollar.dbg.json +1 -1
  18. package/artifacts/contracts/Interfaces.sol/IGoodStaking.dbg.json +1 -1
  19. package/artifacts/contracts/Interfaces.sol/IHasRouter.dbg.json +1 -1
  20. package/artifacts/contracts/Interfaces.sol/IIdentity.dbg.json +1 -1
  21. package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +1 -1
  22. package/artifacts/contracts/Interfaces.sol/ILendingPool.dbg.json +1 -1
  23. package/artifacts/contracts/Interfaces.sol/IMultichainRouter.dbg.json +1 -1
  24. package/artifacts/contracts/Interfaces.sol/INameService.dbg.json +1 -1
  25. package/artifacts/contracts/Interfaces.sol/IUBIScheme.dbg.json +1 -1
  26. package/artifacts/contracts/Interfaces.sol/ProxyAdmin.dbg.json +1 -1
  27. package/artifacts/contracts/Interfaces.sol/Reserve.dbg.json +1 -1
  28. package/artifacts/contracts/Interfaces.sol/Staking.dbg.json +1 -1
  29. package/artifacts/contracts/Interfaces.sol/Uniswap.dbg.json +1 -1
  30. package/artifacts/contracts/Interfaces.sol/UniswapFactory.dbg.json +1 -1
  31. package/artifacts/contracts/Interfaces.sol/UniswapPair.dbg.json +1 -1
  32. package/artifacts/contracts/Interfaces.sol/cERC20.dbg.json +1 -1
  33. package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
  34. package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
  35. package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.dbg.json +1 -1
  36. package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
  37. package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
  38. package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
  39. package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.dbg.json +1 -1
  40. package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +1 -1
  41. package/artifacts/contracts/governance/GoodDollarStaking.sol/IStakingUpgrade.dbg.json +1 -1
  42. package/artifacts/contracts/governance/GoodDollarStaking.sol/RewardsMinter.dbg.json +1 -1
  43. package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
  44. package/artifacts/contracts/governance/MultiBaseGovernanceShareField.sol/MultiBaseGovernanceShareField.dbg.json +1 -1
  45. package/artifacts/contracts/governance/Reputation.sol/Reputation.dbg.json +1 -1
  46. package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
  47. package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
  48. package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
  49. package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
  50. package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +1 -1
  51. package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
  52. package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
  53. package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
  54. package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
  55. package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
  56. package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
  57. package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
  58. package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.dbg.json +1 -1
  59. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
  60. package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
  61. package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.dbg.json +1 -1
  62. package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
  63. package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
  64. package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
  65. package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
  66. package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
  67. package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.dbg.json +1 -1
  68. package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.dbg.json +1 -1
  69. package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
  70. package/artifacts/contracts/mocks/MultichainRouterMock.sol/IWrapper.dbg.json +1 -1
  71. package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.dbg.json +1 -1
  72. package/artifacts/contracts/mocks/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
  73. package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
  74. package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
  75. package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.dbg.json +1 -1
  76. package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
  77. package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
  78. package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
  79. package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
  80. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
  81. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
  82. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
  83. package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
  84. package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
  85. package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
  86. package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
  87. package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
  88. package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
  89. package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
  90. package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
  91. package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
  92. package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
  93. package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.dbg.json +1 -1
  94. package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.dbg.json +1 -1
  95. package/artifacts/contracts/reserve/GoodReserveCDai.sol/ContributionCalc.dbg.json +1 -1
  96. package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.dbg.json +1 -1
  97. package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
  98. package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
  99. package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.dbg.json +1 -1
  100. package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.dbg.json +1 -1
  101. package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.dbg.json +1 -1
  102. package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.dbg.json +1 -1
  103. package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.dbg.json +1 -1
  104. package/artifacts/contracts/staking/SimpleStaking.sol/SimpleStaking.dbg.json +1 -1
  105. package/artifacts/contracts/staking/SimpleStakingV2.sol/SimpleStakingV2.dbg.json +1 -1
  106. package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.dbg.json +1 -1
  107. package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.dbg.json +1 -1
  108. package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
  109. package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
  110. package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
  111. package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
  112. package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
  113. package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.dbg.json +1 -1
  114. package/artifacts/contracts/staking/utils/StakingRewardsFixedAPY.sol/StakingRewardsFixedAPY.dbg.json +1 -1
  115. package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.dbg.json +1 -1
  116. package/artifacts/contracts/token/ERC677.sol/ERC677.dbg.json +1 -1
  117. package/artifacts/contracts/token/ERC677.sol/ERC677Receiver.dbg.json +1 -1
  118. package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.dbg.json +1 -1
  119. package/artifacts/contracts/token/IFeesFormula.sol/IFeesFormula.dbg.json +1 -1
  120. package/artifacts/contracts/token/MultichainFeeFormula.sol/MultichainFeeFormula.dbg.json +1 -1
  121. package/artifacts/contracts/token/superfluid/ERC20Permit.sol/ERC20Permit.dbg.json +1 -1
  122. package/artifacts/contracts/token/superfluid/ERC20Permit.sol/SelfApprove.dbg.json +1 -1
  123. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/IGoodDollarCustom.dbg.json +1 -1
  124. package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/ISuperGoodDollar.dbg.json +1 -1
  125. package/artifacts/contracts/token/superfluid/ISuperToken.sol/ISuperToken.dbg.json +1 -1
  126. package/artifacts/contracts/token/superfluid/ISuperToken.sol/ISuperToken.json +5 -0
  127. package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
  128. package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +25 -2
  129. package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
  130. package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.json +7 -2
  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 +1 -1
  138. package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
  139. package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
  140. package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.dbg.json +1 -1
  141. package/artifacts/contracts/utils/BulkProof.sol/BulkProof.dbg.json +1 -1
  142. package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.dbg.json +1 -1
  143. package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.dbg.json +1 -1
  144. package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.dbg.json +1 -1
  145. package/artifacts/contracts/utils/BuyGDClone.sol/DonateGDClone.dbg.json +1 -1
  146. package/artifacts/contracts/utils/BuyGDClone.sol/IQuoterV2.dbg.json +1 -1
  147. package/artifacts/contracts/utils/BuyGDClone.sol/ISwapRouter.dbg.json +1 -1
  148. package/artifacts/contracts/utils/DAOContract.sol/DAOContract.dbg.json +1 -1
  149. package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
  150. package/artifacts/contracts/utils/DSMath.sol/DSMath.dbg.json +1 -1
  151. package/artifacts/contracts/utils/DataTypes.sol/DataTypes.dbg.json +1 -1
  152. package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.dbg.json +1 -1
  153. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
  154. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/IRouter.dbg.json +1 -1
  155. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/PausableControl.dbg.json +1 -1
  156. package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.dbg.json +1 -1
  157. package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.dbg.json +1 -1
  158. package/artifacts/contracts/utils/MultiCall.sol/Multicall.dbg.json +1 -1
  159. package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.dbg.json +1 -1
  160. package/artifacts/contracts/utils/NameService.sol/NameService.dbg.json +1 -1
  161. package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.dbg.json +1 -1
  162. package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.dbg.json +1 -1
  163. package/artifacts/contracts/utils/ProtocolUpgrade.sol/OldMarketMaker.dbg.json +1 -1
  164. package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.dbg.json +1 -1
  165. package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
  166. package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
  167. package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
  168. package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.dbg.json +1 -1
  169. package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.dbg.json +1 -1
  170. package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.dbg.json +1 -1
  171. package/contracts/token/superfluid/ISuperToken.sol +1 -0
  172. package/contracts/token/superfluid/SuperGoodDollar.sol +11 -2
  173. package/contracts/token/superfluid/SuperToken.sol +8 -0
  174. package/dist/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +25 -2
  175. package/hardhat.config.ts +1 -1
  176. package/package.json +4 -3
  177. package/scripts/blockchainTestSetup.sh +1 -1
  178. package/test/faucet/Faucet.test.ts +63 -19
  179. package/test/faucet/FuseFaucet.test.ts +43 -14
  180. package/test/governance/ClaimersDistribution.test.ts +3 -3
  181. package/test/governance/CompoundVotingMachine.castvote.test.ts +3 -6
  182. package/test/governance/CompoundVotingMachine.crossblockchain.ts +2 -2
  183. package/test/governance/CompoundVotingMachine.daoscheme.ts +1 -1
  184. package/test/governance/CompoundVotingMachine.guardian.test.ts +4 -4
  185. package/test/governance/CompoundVotingMachine.propose.test.ts +8 -8
  186. package/test/governance/CompoundVotingMachine.state.test.ts +4 -4
  187. package/test/governance/GReputation.test.ts +6 -6
  188. package/test/governance/GoodDollarStaking.gd.test.ts +44 -71
  189. package/test/governance/GoodDollarStaking.good.test.ts +52 -73
  190. package/test/governance/GovernanceStaking.test.ts +1 -1
  191. package/test/governance/Reputation.test.ts +2 -2
  192. package/test/helpers.ts +1 -1
  193. package/test/identity/IdentityV2.test.ts +12 -12
  194. package/test/invite/InvitesV1.test.ts +6 -6
  195. package/test/invite/InvitesV2.test.ts +272 -81
  196. package/test/reserve/DistributionHelper.test.ts +232 -139
  197. package/test/reserve/GoodMarketMaker.test.ts +17 -17
  198. package/test/reserve/GoodReserveCDai.cap.test.ts +4 -4
  199. package/test/reserve/GoodReserveCDai.distribution.test.ts +64 -42
  200. package/test/reserve/GoodReserveCDai.gdx.test.ts +1 -1
  201. package/test/reserve/GoodReserveCDai.pause.test.ts +8 -8
  202. package/test/reserve/GoodReserveCDai.test.ts +307 -101
  203. package/test/reserve/GoodReserveCDai.uniswap.test.ts +1 -1
  204. package/test/staking/DonationsStaking.test.ts +2 -2
  205. package/test/staking/FuseStaking.test.ts +3 -3
  206. package/test/staking/GoodAaveStakingFactory.test.ts +2 -2
  207. package/test/staking/StakingRewards.test.ts +913 -320
  208. package/test/staking/StakingRewardsFixedAPY.test.ts +62 -66
  209. package/test/token/CeloGasToken.test.ts +2 -2
  210. package/test/token/GoodDollar.test.ts +5 -5
  211. package/test/token/SuperGoodDollar.test.ts +17 -13
  212. package/test/ubi/UBIScheme.test.ts +1 -1
  213. package/test/utils/AdminWallet.test.ts +10 -10
  214. package/test/utils/BuyAndBridgeHelper.test.ts +33 -9
  215. package/test/utils/GoodDollarMintBurnWrapper.test.ts +265 -113
  216. package/test/utils/NameService.test.ts +1 -1
  217. package/test/utils/ProxyFactory.test.ts +2 -2
  218. package/types/contracts/token/superfluid/SuperGoodDollar.ts +26 -0
  219. package/types/factories/contracts/token/superfluid/ISuperToken__factory.ts +5 -0
  220. package/types/factories/contracts/token/superfluid/SuperGoodDollar__factory.ts +24 -1
  221. package/types/factories/contracts/token/superfluid/SuperToken__factory.ts +6 -1
  222. package/yarn.lock +635 -253
@@ -7,7 +7,7 @@ export MNEMONIC='test test test test test test test test test test test junk'
7
7
  export ADMIN_MNEMONIC='test test test test test test test test test test test junk'
8
8
  yarn set version 3.6.0
9
9
  echo "nodeLinker: node-modules" >> .yarnrc.yml
10
- yarn --immutable
10
+ yarn
11
11
  npx patch-package
12
12
  yarn runNode &
13
13
  sleep 30
@@ -8,7 +8,10 @@ import { createDAO } from "../helpers";
8
8
  const BN = ethers.BigNumber;
9
9
  ["FuseFaucetV2", "Faucet"].forEach(factory => {
10
10
  describe(factory, () => {
11
- let faucet: FuseFaucetV2 | Faucet, founder: SignerWithAddress, fuseFaucet: FuseFaucetV2, faucets;
11
+ let faucet: FuseFaucetV2 | Faucet,
12
+ founder: SignerWithAddress,
13
+ fuseFaucet: FuseFaucetV2,
14
+ faucets;
12
15
  let user1 = ethers.Wallet.createRandom().connect(ethers.provider);
13
16
  let user2 = ethers.Wallet.createRandom().connect(ethers.provider);
14
17
  let signers;
@@ -21,7 +24,14 @@ const BN = ethers.BigNumber;
21
24
 
22
25
  const FuseFaucetF = await ethers.getContractFactory(factory);
23
26
 
24
- let { daoCreator, controller, avatar: av, gd: gooddollar, identity, nameService } = await loadFixture(createDAO);
27
+ let {
28
+ daoCreator,
29
+ controller,
30
+ avatar: av,
31
+ gd: gooddollar,
32
+ identity,
33
+ nameService
34
+ } = await loadFixture(createDAO);
25
35
 
26
36
  Controller = controller;
27
37
  avatar = av;
@@ -50,8 +60,16 @@ const BN = ethers.BigNumber;
50
60
  }
51
61
  )) as FuseFaucetV2;
52
62
 
53
- gd = (await ethers.getContractAt("IGoodDollar", gooddollar, founder)) as IGoodDollar;
54
- id = (await ethers.getContractAt("IIdentity", identity, founder)) as IIdentity;
63
+ gd = (await ethers.getContractAt(
64
+ "IGoodDollar",
65
+ gooddollar,
66
+ founder
67
+ )) as IGoodDollar;
68
+ id = (await ethers.getContractAt(
69
+ "IIdentity",
70
+ identity,
71
+ founder
72
+ )) as IIdentity;
55
73
 
56
74
  await founder.sendTransaction({
57
75
  value: ethers.utils.parseEther("1"),
@@ -68,12 +86,16 @@ const BN = ethers.BigNumber;
68
86
 
69
87
  it("should not unauthorized to top new user", async () => {
70
88
  expect(await faucet.canTop(user1.address)).to.true;
71
- await expect(faucet.topWallet(user1.address)).revertedWith("not authorized");
89
+ await expect(faucet.topWallet(user1.address)).revertedWith(
90
+ /not authorized/
91
+ );
72
92
  });
73
93
 
74
94
  it("should let new user top once", async () => {
75
95
  expect(await faucet.canTop(user1.address)).to.true;
76
- const tx = await (await faucet.connect(signers[0]).topWallet(user1.address)).wait();
96
+ const tx = await (
97
+ await faucet.connect(signers[0]).topWallet(user1.address)
98
+ ).wait();
77
99
  const balance = await ethers.provider.getBalance(user1.address);
78
100
  expect(balance).to.equal(await faucet.getToppingAmount());
79
101
  });
@@ -84,18 +106,22 @@ const BN = ethers.BigNumber;
84
106
  value: ethers.utils.parseUnits("400000", "gwei")
85
107
  });
86
108
  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
- );
109
+ await expect(
110
+ faucet.connect(signers[0]).topWallet(user1.address)
111
+ ).to.revertedWith(/User not whitelisted or not first time/);
90
112
  });
91
113
 
92
114
  it("should not refund gas when reverted", async () => {
93
115
  const balance = await ethers.provider.getBalance(founder.address);
94
116
  const faucetBalance = await ethers.provider.getBalance(faucet.address);
95
117
  expect(await faucet.canTop(user1.address)).to.false;
96
- await expect(faucet.topWallet(user1.address)).to.revertedWith("User not whitelisted or not first time");
118
+ await expect(faucet.topWallet(user1.address)).to.revertedWith(
119
+ /User not whitelisted or not first time/
120
+ );
97
121
  const balanceAfter = await ethers.provider.getBalance(founder.address);
98
- const faucetBalanceAfter = await ethers.provider.getBalance(faucet.address);
122
+ const faucetBalanceAfter = await ethers.provider.getBalance(
123
+ faucet.address
124
+ );
99
125
  expect(faucetBalanceAfter).to.eq(faucetBalance);
100
126
  expect(balanceAfter).to.lt(balance);
101
127
  });
@@ -103,7 +129,9 @@ const BN = ethers.BigNumber;
103
129
  it("should let user top again once identified", async () => {
104
130
  await user1.sendTransaction({
105
131
  to: ethers.constants.AddressZero,
106
- value: (await ethers.provider.getBalance(user1.address)).sub(ethers.utils.parseUnits("100000", "gwei"))
132
+ value: (
133
+ await ethers.provider.getBalance(user1.address)
134
+ ).sub(ethers.utils.parseUnits("100000", "gwei"))
107
135
  });
108
136
  await id.addWhitelistedWithDID(user1.address, "did:1");
109
137
  expect(await faucet.canTop(user1.address)).to.true;
@@ -116,7 +144,9 @@ const BN = ethers.BigNumber;
116
144
  it("should not let identified user top over daily limit", async () => {
117
145
  await user1.sendTransaction({
118
146
  to: ethers.constants.AddressZero,
119
- value: (await ethers.provider.getBalance(user1.address)).sub(ethers.utils.parseUnits("100000", "gwei"))
147
+ value: (
148
+ await ethers.provider.getBalance(user1.address)
149
+ ).sub(ethers.utils.parseUnits("100000", "gwei"))
120
150
  });
121
151
  const tx = await (await faucet.topWallet(user1.address)).wait();
122
152
  await user1.sendTransaction({
@@ -124,7 +154,9 @@ const BN = ethers.BigNumber;
124
154
  value: ethers.utils.parseUnits("400000", "gwei")
125
155
  });
126
156
  expect(await faucet.canTop(user1.address)).to.false;
127
- await expect(faucet.topWallet(user1.address)).to.revertedWith("max daily toppings");
157
+ await expect(faucet.topWallet(user1.address)).to.revertedWith(
158
+ /max daily toppings/
159
+ );
128
160
  });
129
161
 
130
162
  // it("should not top if wallet not half empty", async () => {
@@ -152,7 +184,7 @@ const BN = ethers.BigNumber;
152
184
  // await ethers.provider.send("evm_increaseTime", [60 * 60 * 24]);
153
185
 
154
186
  await expect(faucet.topWallet(user1.address)).to.revertedWith(
155
- "User wallet has been topped too many times this week"
187
+ /User wallet has been topped too many times this week/
156
188
  );
157
189
  expect(await faucet.canTop(user1.address)).to.false;
158
190
 
@@ -170,11 +202,19 @@ const BN = ethers.BigNumber;
170
202
  console.log(toppingAmount.toString(), "topping amount");
171
203
  const minTopping = await faucet.minTopping();
172
204
  const balance = await ethers.provider.getBalance(founder.address);
173
- await founder.sendTransaction({ to: user2.address, value: toppingAmount.mul(100 - minTopping + 1).div(100) });
205
+ await founder.sendTransaction({
206
+ to: user2.address,
207
+ value: toppingAmount.mul(100 - minTopping + 1).div(100)
208
+ });
174
209
 
175
210
  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) });
211
+ await expect(faucet.topWallet(user2.address)).to.revertedWith(
212
+ /low toTop/
213
+ );
214
+ await user2.sendTransaction({
215
+ to: founder.address,
216
+ value: toppingAmount.mul(2).div(100)
217
+ });
178
218
  expect(await faucet.canTop(user2.address)).to.be.true;
179
219
  await expect(faucet.topWallet(user2.address)).not.reverted;
180
220
  });
@@ -183,7 +223,11 @@ const BN = ethers.BigNumber;
183
223
  const tempUser = ethers.Wallet.createRandom().connect(ethers.provider);
184
224
 
185
225
  const balance = await ethers.provider.getBalance(founder.address);
186
- const tx = await (await faucet.connect(signers[0]).topWallet(tempUser.address, { gasPrice: 1e9 })).wait();
226
+ const tx = await (
227
+ await faucet
228
+ .connect(signers[0])
229
+ .topWallet(tempUser.address, { gasPrice: 1e9 })
230
+ ).wait();
187
231
  // const gasCosts = tx.gasUsed.mul(1e9);
188
232
  // const afterRefund = gasCosts.sub(await faucet["gasRefund()"]());
189
233
  const balanceAfter = await ethers.provider.getBalance(founder.address);
@@ -20,7 +20,14 @@ describe("FuseFaucet", () => {
20
20
 
21
21
  const FuseFaucetF = await ethers.getContractFactory("FuseFaucet");
22
22
 
23
- let { daoCreator, controller, avatar: av, gd: gooddollar, identity, nameService } = await loadFixture(createDAO);
23
+ let {
24
+ daoCreator,
25
+ controller,
26
+ avatar: av,
27
+ gd: gooddollar,
28
+ identity,
29
+ nameService
30
+ } = await loadFixture(createDAO);
24
31
 
25
32
  Controller = controller;
26
33
  avatar = av;
@@ -38,8 +45,16 @@ describe("FuseFaucet", () => {
38
45
  kind: "transparent"
39
46
  })) as FuseFaucet;
40
47
 
41
- gd = (await ethers.getContractAt("IGoodDollar", gooddollar, founder)) as IGoodDollar;
42
- id = (await ethers.getContractAt("IIdentity", identity, founder)) as IIdentity;
48
+ gd = (await ethers.getContractAt(
49
+ "IGoodDollar",
50
+ gooddollar,
51
+ founder
52
+ )) as IGoodDollar;
53
+ id = (await ethers.getContractAt(
54
+ "IIdentity",
55
+ identity,
56
+ founder
57
+ )) as IIdentity;
43
58
 
44
59
  await founder.sendTransaction({
45
60
  value: ethers.utils.parseEther("1"),
@@ -52,13 +67,19 @@ describe("FuseFaucet", () => {
52
67
  const faucet = await upgrades.deployProxy(FaucetV1, [id.address], {
53
68
  kind: "transparent"
54
69
  });
55
- const res = await upgrades.upgradeProxy(faucet.address, await ethers.getContractFactory("FuseFaucetV2"), {
56
- kind: "transparent",
57
- unsafeAllowRenames: true,
58
- call: { fn: "upgrade", args: [signers[1].address, founder.address, ns] }
59
- });
70
+ const res = await upgrades.upgradeProxy(
71
+ faucet.address,
72
+ await ethers.getContractFactory("FuseFaucetV2"),
73
+ {
74
+ kind: "transparent",
75
+ unsafeAllowRenames: true,
76
+ call: { fn: "upgrade", args: [signers[1].address, founder.address, ns] }
77
+ }
78
+ );
60
79
  expect(res).not.empty;
61
- await expect(res.upgrade(signers[0].address, signers[0].address, ns)).revertedWith("wrong upgrade version");
80
+ await expect(
81
+ res.upgrade(signers[0].address, signers[0].address, ns)
82
+ ).revertedWith(/wrong upgrade version/);
62
83
  expect(await res.owner()).equal(founder.address);
63
84
  expect(await res.relayer()).equal(signers[1].address);
64
85
  });
@@ -81,14 +102,18 @@ describe("FuseFaucet", () => {
81
102
  value: ethers.utils.parseUnits("400000", "gwei")
82
103
  });
83
104
  expect(await faucet.canTop(user1.address)).to.false;
84
- await expect(faucet.topWallet(user1.address)).to.revertedWith("User not whitelisted or not first time");
105
+ await expect(faucet.topWallet(user1.address)).to.revertedWith(
106
+ /User not whitelisted or not first time/
107
+ );
85
108
  });
86
109
 
87
110
  it("should not refund gas when reverted", async () => {
88
111
  const balance = await ethers.provider.getBalance(founder.address);
89
112
  const faucetBalance = await ethers.provider.getBalance(faucet.address);
90
113
  expect(await faucet.canTop(user1.address)).to.false;
91
- await expect(faucet.topWallet(user1.address)).to.revertedWith("User not whitelisted or not first time");
114
+ await expect(faucet.topWallet(user1.address)).to.revertedWith(
115
+ /User not whitelisted or not first time/
116
+ );
92
117
  const balanceAfter = await ethers.provider.getBalance(founder.address);
93
118
  const faucetBalanceAfter = await ethers.provider.getBalance(faucet.address);
94
119
  expect(faucetBalanceAfter).to.eq(faucetBalance);
@@ -115,7 +140,9 @@ describe("FuseFaucet", () => {
115
140
  value: ethers.utils.parseUnits("400000", "gwei")
116
141
  });
117
142
  expect(await faucet.canTop(user1.address)).to.false;
118
- await expect(faucet.topWallet(user1.address)).to.revertedWith("max daily toppings");
143
+ await expect(faucet.topWallet(user1.address)).to.revertedWith(
144
+ /max daily toppings/
145
+ );
119
146
  });
120
147
 
121
148
  // it("should not top if wallet not half empty", async () => {
@@ -138,7 +165,7 @@ describe("FuseFaucet", () => {
138
165
 
139
166
  expect(await faucet.canTop(user1.address)).to.false;
140
167
  await expect(faucet.topWallet(user1.address)).to.revertedWith(
141
- "User wallet has been topped too many times this week"
168
+ /User wallet has been topped too many times this week/
142
169
  );
143
170
 
144
171
  //should be able to top again after some days passed
@@ -150,7 +177,9 @@ describe("FuseFaucet", () => {
150
177
 
151
178
  it("should reimburse gas costs", async () => {
152
179
  const balance = await ethers.provider.getBalance(founder.address);
153
- const tx = await (await faucet.topWallet(user2.address, { gasPrice: 1e9 })).wait();
180
+ const tx = await (
181
+ await faucet.topWallet(user2.address, { gasPrice: 1e9 })
182
+ ).wait();
154
183
  // const gasCosts = tx.gasUsed.mul(1e9);
155
184
  // const afterRefund = gasCosts.sub(await faucet["gasRefund()"]());
156
185
  const balanceAfter = await ethers.provider.getBalance(founder.address);
@@ -95,7 +95,7 @@ describe("ClaimersDistribution", () => {
95
95
  it("should not be able to set monthly distribution", async () => {
96
96
  await expect(
97
97
  cd["setMonthlyReputationDistribution(uint256)"](10)
98
- ).to.revertedWith("only avatar");
98
+ ).to.revertedWith(/only avatar/);
99
99
  });
100
100
 
101
101
  it("should be able to set monthly distribution by avatar", async () => {
@@ -109,7 +109,7 @@ describe("ClaimersDistribution", () => {
109
109
 
110
110
  it("should not update claim if didnt claim today", async () => {
111
111
  await expect(cd.updateClaim(claimer1.address)).to.revertedWith(
112
- "ClaimersDistribution: didn't claim today"
112
+ /ClaimersDistribution: didn't claim today/
113
113
  );
114
114
  });
115
115
 
@@ -127,7 +127,7 @@ describe("ClaimersDistribution", () => {
127
127
 
128
128
  it("should not update claim if already updated", async () => {
129
129
  await expect(cd.updateClaim(claimer1.address)).to.revertedWith(
130
- "ClaimersDistribution: already updated"
130
+ /ClaimersDistribution: already updated/
131
131
  );
132
132
  });
133
133
 
@@ -63,8 +63,7 @@ describe("CompoundVotingMachine#CastVote", () => {
63
63
 
64
64
  describe("We must revert if:", () => {
65
65
  it("There does not exist a proposal with matching proposal id where the current block number is between the proposal's start block (exclusive) and end block (inclusive)", async () => {
66
- await expect(gov.castVote(proposalId, true)).to.revertedWith(
67
- "CompoundVotingMachine::_castVote: voting is closed"
66
+ await expect(gov.castVote(proposalId, true)).to.revertedWith(/CompoundVotingMachine::_castVote: voting is closed/
68
67
  );
69
68
  });
70
69
 
@@ -72,8 +71,7 @@ describe("CompoundVotingMachine#CastVote", () => {
72
71
  await gov.connect(signers[0]).castVote(proposalId, true);
73
72
  await expect(
74
73
  gov.connect(signers[0]).castVote(proposalId, true)
75
- ).to.revertedWith(
76
- "CompoundVotingMachine::_castVote: voter already voted"
74
+ ).to.revertedWith(/CompoundVotingMachine::_castVote: voter already voted/
77
75
  );
78
76
  });
79
77
  });
@@ -166,8 +164,7 @@ describe("CompoundVotingMachine#CastVote", () => {
166
164
  ethers.utils.hexZeroPad("0xbac", 32),
167
165
  ethers.utils.hexZeroPad("0xbada", 32)
168
166
  )
169
- ).to.revertedWith(
170
- "CompoundVotingMachine::castVoteBySig: invalid signature"
167
+ ).to.revertedWith(/CompoundVotingMachine::castVoteBySig: invalid signature/
171
168
  );
172
169
  });
173
170
 
@@ -62,7 +62,7 @@ describe("CompoundVotingMachine#cross blockchain", () => {
62
62
 
63
63
  it("reverts emit succeeded if not passed", async () => {
64
64
  await expect(gov.emitSucceeded(await gov.proposalCount())).to.revertedWith(
65
- "not Succeeded"
65
+ /not Succeeded/
66
66
  );
67
67
  });
68
68
 
@@ -72,7 +72,7 @@ describe("CompoundVotingMachine#cross blockchain", () => {
72
72
  await increaseTime(queuePeriod);
73
73
 
74
74
  await expect(gov.execute(await gov.proposalCount())).to.revertedWith(
75
- "wrong blockchain"
75
+ /wrong blockchain/
76
76
  );
77
77
  });
78
78
 
@@ -163,7 +163,7 @@ describe("CompoundVotingMachine#DAOScheme", () => {
163
163
  it("Should not be able to change params if not avatar", async () => {
164
164
  await expect(
165
165
  gov.setVotingParameters([0, 0, 0, 0, 0, 0, 0, 0, 0])
166
- ).to.revertedWith("only avatar");
166
+ ).to.revertedWith(/only avatar/);
167
167
  });
168
168
 
169
169
  it("Should be able to propose parameters changes", async () => {
@@ -1,4 +1,4 @@
1
- import hre, { ethers, upgrades, waffle } from "hardhat";
1
+ import hre, { ethers, upgrades } from "hardhat";
2
2
  import { loadFixture } from "@nomicfoundation/hardhat-network-helpers";
3
3
  import { expect } from "chai";
4
4
  import { GReputation, CompoundVotingMachine } from "../../types";
@@ -100,7 +100,7 @@ describe("CompoundVotingMachine#Guardian", () => {
100
100
  it("Should not be able to change guardian if not guardian or avatar", async () => {
101
101
  await expect(
102
102
  gov.connect(acct).setGuardian(acct.address)
103
- ).to.be.revertedWith("CompoundVotingMachine: not avatar or guardian");
103
+ ).to.be.revertedWith(/CompoundVotingMachine: not avatar or guardian/);
104
104
  });
105
105
 
106
106
  it("Should not be able to change guardian before foundation release time by avatar", async () => {
@@ -113,7 +113,7 @@ describe("CompoundVotingMachine#Guardian", () => {
113
113
 
114
114
  it("Should not be able to renounce guardian if not guardian", async () => {
115
115
  await expect(gov.connect(acct).renounceGuardian()).to.be.revertedWith(
116
- "CompoundVotingMachine: not guardian"
116
+ /CompoundVotingMachine: not guardian/
117
117
  );
118
118
  });
119
119
 
@@ -196,7 +196,7 @@ describe("CompoundVotingMachine#Guardian", () => {
196
196
  await advanceBlocks(1);
197
197
 
198
198
  await expect(gov.cancel(proposalId)).to.be.revertedWith(
199
- "CompoundVotingMachine::cancel: proposer above threshold"
199
+ /CompoundVotingMachine::cancel: proposer above threshold/
200
200
  ); //should not be cancelable by anyone else buy guardian
201
201
 
202
202
  await gov.connect(signers[1]).cancel(proposalId);
@@ -72,7 +72,7 @@ describe("CompoundVotingMachine#propose", () => {
72
72
  "do nothing"
73
73
  )
74
74
  ).to.revertedWith(
75
- "CompoundVotingMachine::propose: one live proposal per proposer, found an already pending proposal"
75
+ /CompoundVotingMachine::propose: one live proposal per proposer, found an already pending proposal/
76
76
  );
77
77
  });
78
78
 
@@ -144,7 +144,7 @@ describe("CompoundVotingMachine#propose", () => {
144
144
  "do nothing"
145
145
  )
146
146
  ).to.revertedWith(
147
- "CompoundVotingMachine::propose: one live proposal per proposer, found an already active proposal"
147
+ /CompoundVotingMachine::propose: one live proposal per proposer, found an already active proposal/
148
148
  );
149
149
  });
150
150
  });
@@ -162,7 +162,7 @@ describe("CompoundVotingMachine#propose", () => {
162
162
  "do nothing"
163
163
  )
164
164
  ).to.revertedWith(
165
- "CompoundVotingMachine::propose: proposer votes below proposal threshold"
165
+ /CompoundVotingMachine::propose: proposer votes below proposal threshold/
166
166
  );
167
167
  });
168
168
 
@@ -176,7 +176,7 @@ describe("CompoundVotingMachine#propose", () => {
176
176
  "do nothing"
177
177
  )
178
178
  ).to.revertedWith(
179
- "CompoundVotingMachine::propose: proposal function information arity mismatch"
179
+ /CompoundVotingMachine::propose: proposal function information arity mismatch/
180
180
  );
181
181
 
182
182
  await expect(
@@ -188,7 +188,7 @@ describe("CompoundVotingMachine#propose", () => {
188
188
  "do nothing"
189
189
  )
190
190
  ).to.revertedWith(
191
- "CompoundVotingMachine::propose: proposal function information arity mismatch"
191
+ /CompoundVotingMachine::propose: proposal function information arity mismatch/
192
192
  );
193
193
 
194
194
  await expect(
@@ -200,7 +200,7 @@ describe("CompoundVotingMachine#propose", () => {
200
200
  "do nothing"
201
201
  )
202
202
  ).to.revertedWith(
203
- "CompoundVotingMachine::propose: proposal function information arity mismatch"
203
+ /CompoundVotingMachine::propose: proposal function information arity mismatch/
204
204
  );
205
205
 
206
206
  await expect(
@@ -212,7 +212,7 @@ describe("CompoundVotingMachine#propose", () => {
212
212
  "do nothing"
213
213
  )
214
214
  ).to.revertedWith(
215
- "CompoundVotingMachine::propose: proposal function information arity mismatch"
215
+ /CompoundVotingMachine::propose: proposal function information arity mismatch/
216
216
  );
217
217
  });
218
218
 
@@ -226,7 +226,7 @@ describe("CompoundVotingMachine#propose", () => {
226
226
  "do nothing"
227
227
  )
228
228
  ).to.revertedWith(
229
- "CompoundVotingMachine::propose: must provide actions"
229
+ /CompoundVotingMachine::propose: must provide actions/
230
230
  );
231
231
  });
232
232
  });
@@ -111,7 +111,7 @@ describe("CompoundVotingMachine#States", () => {
111
111
 
112
112
  it("Invalid for proposal not found", async () => {
113
113
  await expect(gov.state(5)).to.revertedWith(
114
- "CompoundVotingMachine::state: invalid proposal id"
114
+ /CompoundVotingMachine::state: invalid proposal id/
115
115
  );
116
116
  });
117
117
 
@@ -190,7 +190,7 @@ describe("CompoundVotingMachine#States", () => {
190
190
  await expect(
191
191
  gov.connect(acct).castVote(proposalId, false)
192
192
  ).to.be.revertedWith(
193
- "CompoundVotingMachine::_castVote: voting is closed"
193
+ /CompoundVotingMachine::_castVote: voting is closed/
194
194
  );
195
195
  });
196
196
 
@@ -198,7 +198,7 @@ describe("CompoundVotingMachine#States", () => {
198
198
  await increaseTime(10);
199
199
  expect(states[await gov.state(proposalId)]).to.equal("Expired");
200
200
  await expect(gov.execute(proposalId)).to.be.revertedWith(
201
- "CompoundVotingMachine::execute: proposal can only be executed if it is succeeded"
201
+ /CompoundVotingMachine::execute: proposal can only be executed if it is succeeded/
202
202
  );
203
203
  });
204
204
  });
@@ -270,7 +270,7 @@ describe("CompoundVotingMachine#States", () => {
270
270
  let actor = signers[1];
271
271
  let proposalId = await gov.latestProposalIds(actor.address);
272
272
  await expect(gov.cancel(proposalId)).to.be.revertedWith(
273
- "cannot cancel executed proposal"
273
+ /cannot cancel executed proposal/
274
274
  );
275
275
  });
276
276
 
@@ -136,10 +136,10 @@ describe("GReputation", () => {
136
136
 
137
137
  it("should not be able to mint or burn if not minter", async () => {
138
138
  await expect(grep.connect(signers[4]).mint(founder, 2)).to.revertedWith(
139
- "GReputation: need minter role or be GDAO contract"
139
+ /GReputation: need minter role or be GDAO contract/
140
140
  );
141
141
  await expect(grep.connect(signers[4]).burn(founder, 2)).to.revertedWith(
142
- "GReputation: need minter role or be GDAO contract"
142
+ /GReputation: need minter role or be GDAO contract/
143
143
  );
144
144
  });
145
145
 
@@ -312,7 +312,7 @@ describe("GReputation", () => {
312
312
  ethers.utils.hexZeroPad("0xbadd", 32),
313
313
  ethers.utils.hexZeroPad("0xbadd", 32)
314
314
  )
315
- ).to.revertedWith("GReputation::delegateBySig: invalid signature");
315
+ ).to.revertedWith(/GReputation::delegateBySig: invalid signature/);
316
316
  });
317
317
 
318
318
  it("It should not be delegate when delegation address is null", async () => {
@@ -353,7 +353,7 @@ describe("GReputation", () => {
353
353
  const sig = ethers.utils.splitSignature(signature);
354
354
  await expect(
355
355
  grep.delegateBySig(delegate, nonce, expiry, sig.v, sig.r, sig.s)
356
- ).to.revertedWith("GReputation::delegateBySig: invalid nonce");
356
+ ).to.revertedWith(/GReputation::delegateBySig: invalid nonce/);
357
357
  });
358
358
 
359
359
  it("reverts if the signature has expired", async () => {
@@ -373,7 +373,7 @@ describe("GReputation", () => {
373
373
  const sig = ethers.utils.splitSignature(signature);
374
374
  await expect(
375
375
  grep.delegateBySig(delegate, nonce, expiry, sig.v, sig.r, sig.s)
376
- ).to.revertedWith("GReputation::delegateBySig: signature expired");
376
+ ).to.revertedWith(/GReputation::delegateBySig: signature expired/);
377
377
  });
378
378
 
379
379
  describe("delegates on behalf of the signatory", () => {
@@ -588,7 +588,7 @@ describe("GReputation", () => {
588
588
  it("should set a new state hash", async () => {
589
589
  await expect(
590
590
  grep.setBlockchainStateHash("fuse", fuseHash, BN.from("100"))
591
- ).to.be.revertedWith("only avatar can call this method");
591
+ ).to.be.revertedWith(/only avatar can call this method/);
592
592
 
593
593
  let encodedCall = grep.interface.encodeFunctionData(
594
594
  "setBlockchainStateHash",