@gooddollar/goodprotocol 2.0.21 → 2.0.22

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 (223) 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/releases/deployment.json +2 -2
  178. package/scripts/blockchainTestSetup.sh +1 -1
  179. package/test/faucet/Faucet.test.ts +63 -19
  180. package/test/faucet/FuseFaucet.test.ts +43 -14
  181. package/test/governance/ClaimersDistribution.test.ts +3 -3
  182. package/test/governance/CompoundVotingMachine.castvote.test.ts +3 -6
  183. package/test/governance/CompoundVotingMachine.crossblockchain.ts +2 -2
  184. package/test/governance/CompoundVotingMachine.daoscheme.ts +1 -1
  185. package/test/governance/CompoundVotingMachine.guardian.test.ts +4 -4
  186. package/test/governance/CompoundVotingMachine.propose.test.ts +8 -8
  187. package/test/governance/CompoundVotingMachine.state.test.ts +4 -4
  188. package/test/governance/GReputation.test.ts +6 -6
  189. package/test/governance/GoodDollarStaking.gd.test.ts +44 -71
  190. package/test/governance/GoodDollarStaking.good.test.ts +52 -73
  191. package/test/governance/GovernanceStaking.test.ts +1 -1
  192. package/test/governance/Reputation.test.ts +2 -2
  193. package/test/helpers.ts +1 -1
  194. package/test/identity/IdentityV2.test.ts +12 -12
  195. package/test/invite/InvitesV1.test.ts +6 -6
  196. package/test/invite/InvitesV2.test.ts +272 -81
  197. package/test/reserve/DistributionHelper.test.ts +232 -139
  198. package/test/reserve/GoodMarketMaker.test.ts +17 -17
  199. package/test/reserve/GoodReserveCDai.cap.test.ts +4 -4
  200. package/test/reserve/GoodReserveCDai.distribution.test.ts +64 -42
  201. package/test/reserve/GoodReserveCDai.gdx.test.ts +1 -1
  202. package/test/reserve/GoodReserveCDai.pause.test.ts +8 -8
  203. package/test/reserve/GoodReserveCDai.test.ts +307 -101
  204. package/test/reserve/GoodReserveCDai.uniswap.test.ts +1 -1
  205. package/test/staking/DonationsStaking.test.ts +2 -2
  206. package/test/staking/FuseStaking.test.ts +3 -3
  207. package/test/staking/GoodAaveStakingFactory.test.ts +2 -2
  208. package/test/staking/StakingRewards.test.ts +913 -320
  209. package/test/staking/StakingRewardsFixedAPY.test.ts +62 -66
  210. package/test/token/CeloGasToken.test.ts +2 -2
  211. package/test/token/GoodDollar.test.ts +5 -5
  212. package/test/token/SuperGoodDollar.test.ts +17 -13
  213. package/test/ubi/UBIScheme.test.ts +1 -1
  214. package/test/utils/AdminWallet.test.ts +10 -10
  215. package/test/utils/BuyAndBridgeHelper.test.ts +33 -9
  216. package/test/utils/GoodDollarMintBurnWrapper.test.ts +265 -113
  217. package/test/utils/NameService.test.ts +1 -1
  218. package/test/utils/ProxyFactory.test.ts +2 -2
  219. package/types/contracts/token/superfluid/SuperGoodDollar.ts +26 -0
  220. package/types/factories/contracts/token/superfluid/ISuperToken__factory.ts +5 -0
  221. package/types/factories/contracts/token/superfluid/SuperGoodDollar__factory.ts +24 -1
  222. package/types/factories/contracts/token/superfluid/SuperToken__factory.ts +6 -1
  223. package/yarn.lock +635 -253
@@ -113,14 +113,14 @@ describe("Identity", () => {
113
113
  let whitelisted = signers[1];
114
114
  await expect(
115
115
  identity.connect(signers[2]).addWhitelisted(whitelisted.address)
116
- ).revertedWith("AccessControl: account");
116
+ ).revertedWith(/AccessControl: account/);
117
117
  });
118
118
 
119
119
  it("should revert when non admin tries to add blacklist", async () => {
120
120
  let blacklisted = signers[1];
121
121
  await expect(
122
122
  identity.connect(signers[2]).addBlacklisted(blacklisted.address)
123
- ).revertedWith("AccessControl: account");
123
+ ).revertedWith(/AccessControl: account/);
124
124
  });
125
125
 
126
126
  it("should revert when non admin tries to set the authentication period", async () => {
@@ -150,7 +150,7 @@ describe("Identity", () => {
150
150
  let authuser = signers[0].address;
151
151
  await expect(
152
152
  identity.connect(signers[2]).authenticate(authuser)
153
- ).revertedWith("AccessControl: account");
153
+ ).revertedWith(/AccessControl: account/);
154
154
  });
155
155
 
156
156
  it("should authenticate the user with the correct timestamp", async () => {
@@ -225,13 +225,13 @@ describe("Identity", () => {
225
225
 
226
226
  await expect(
227
227
  identity.addWhitelistedWithDID(whitelisted2.address, "testString")
228
- ).revertedWith("DID already registered");
228
+ ).revertedWith(/DID already registered/);
229
229
  });
230
230
 
231
231
  it("should not allow adding non contract to contracts", async () => {
232
232
  let outsider = signers[0];
233
233
  await expect(identity.addContract(outsider.address)).revertedWith(
234
- "Given address is not a contract"
234
+ /Given address is not a contract/
235
235
  );
236
236
  });
237
237
 
@@ -330,11 +330,11 @@ describe("Identity", () => {
330
330
  "0x",
331
331
  await ethers.provider.getBlockNumber()
332
332
  )
333
- ).revertedWith("invalid deadline");
333
+ ).revertedWith(/invalid deadline/);
334
334
 
335
335
  await expect(
336
336
  identity.connect(whitelisted).connectAccount(toconnect.address, "0x", 0)
337
- ).revertedWith("invalid deadline");
337
+ ).revertedWith(/invalid deadline/);
338
338
  });
339
339
 
340
340
  it("should not allow to replay signature", async () => {
@@ -353,7 +353,7 @@ describe("Identity", () => {
353
353
  signed,
354
354
  (await ethers.provider.getBlockNumber()) + 10
355
355
  )
356
- ).revertedWith("invalid signature");
356
+ ).revertedWith(/invalid signature/);
357
357
  });
358
358
 
359
359
  it("should not allow to connect account already whitelisted", async () => {
@@ -366,7 +366,7 @@ describe("Identity", () => {
366
366
  identity
367
367
  .connect(whitelisted)
368
368
  .connectAccount(signers[2].address, "0x", 20000000)
369
- ).revertedWith("invalid account");
369
+ ).revertedWith(/invalid account/);
370
370
  });
371
371
 
372
372
  it("should allow to disconnect account by owner or connected", async () => {
@@ -391,7 +391,7 @@ describe("Identity", () => {
391
391
  const connected = signers[10];
392
392
  const whitelisted = signers[1];
393
393
  await expect(identity.disconnectAccount(connected.address)).revertedWith(
394
- "unauthorized"
394
+ /unauthorized/
395
395
  );
396
396
  });
397
397
 
@@ -406,7 +406,7 @@ describe("Identity", () => {
406
406
  identity
407
407
  .connect(signers[2])
408
408
  .connectAccount(connected.address, "0x", 200000)
409
- ).revertedWith("already connected");
409
+ ).revertedWith(/already connected/);
410
410
  });
411
411
 
412
412
  it("should return same root for multiple connected accounts", async () => {
@@ -490,7 +490,7 @@ describe("Identity", () => {
490
490
  newid
491
491
  .connect(signers[1])
492
492
  ["setDID(address,string)"](signers[1].address, "testolddid")
493
- ).revertedWith("DID already registered oldIdentity");
493
+ ).revertedWith(/DID already registered oldIdentity/);
494
494
  });
495
495
 
496
496
  it("should set did if set in oldidentity by same owner", async () => {
@@ -101,7 +101,7 @@ describe("InvitesV1", () => {
101
101
  ethers.utils.hexZeroPad("0xfa", 32),
102
102
  ethers.utils.hexZeroPad("0x01", 32)
103
103
  )
104
- ).to.revertedWith("user already joined");
104
+ ).to.revertedWith(/user already joined/);
105
105
  });
106
106
 
107
107
  it("should not allow code reuse", async () => {
@@ -110,7 +110,7 @@ describe("InvitesV1", () => {
110
110
  invites
111
111
  .connect(inviter2)
112
112
  .join(ethers.utils.hexZeroPad("0xfa", 32), ethers.constants.HashZero)
113
- ).to.revertedWith("invite code already in use");
113
+ ).to.revertedWith(/invite code already in use/);
114
114
  });
115
115
 
116
116
  it("should mark inviter", async () => {
@@ -129,7 +129,7 @@ describe("InvitesV1", () => {
129
129
  it("should not pay bounty for non whitelisted invitee", async () => {
130
130
  await expect(
131
131
  invites.connect(inviter1).bountyFor(invitee1.address)
132
- ).to.revertedWith("user not elligble for bounty yet");
132
+ ).to.revertedWith(/user not elligble for bounty yet/);
133
133
  });
134
134
 
135
135
  it("should not pay bounty for non whitelisted inviter", async () => {
@@ -138,7 +138,7 @@ describe("InvitesV1", () => {
138
138
  expect(await invites.canCollectBountyFor(invitee1.address)).to.be.false;
139
139
  await expect(
140
140
  invites.connect(inviter1).bountyFor(invitee1.address)
141
- ).to.revertedWith("user not elligble for bounty yet");
141
+ ).to.revertedWith(/user not elligble for bounty yet/);
142
142
  });
143
143
 
144
144
  it("should pay bounty for whitelisted invitee and inviter", async () => {
@@ -200,7 +200,7 @@ describe("InvitesV1", () => {
200
200
  it("should not pay bounty twice", async () => {
201
201
  await expect(
202
202
  invites.connect(inviter2).bountyFor(invitee1.address)
203
- ).to.revertedWith("user not elligble for bounty yet");
203
+ ).to.revertedWith(/user not elligble for bounty yet/);
204
204
  });
205
205
 
206
206
  it("should not fail in collectBounties for invalid invitees", async () => {
@@ -260,7 +260,7 @@ describe("InvitesV1", () => {
260
260
  it("should not set level not by owner", async () => {
261
261
  await expect(
262
262
  invites.connect(inviter1).setLevel(0, 1, 5, 1)
263
- ).to.revertedWith("Only owner or avatar can perform this action");
263
+ ).to.revertedWith(/Only owner or avatar can perform this action/);
264
264
  });
265
265
 
266
266
  it("should set level by owner", async () => {