@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.
- package/artifacts/abis/ISuperToken.min.json +1 -1
- package/artifacts/abis/SuperGoodDollar.min.json +1 -1
- package/artifacts/abis/SuperToken.min.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/Avatar.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/Controller.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/IntVoteInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/ReputationInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/SchemeRegistrar.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/AggregatorV3Interface.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ERC20.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IAaveIncentivesController.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IAdminWallet.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IDonationStaking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IERC2917.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IGoodStaking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IHasRouter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IIdentity.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ILendingPool.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IMultichainRouter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/INameService.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IUBIScheme.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ProxyAdmin.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Reserve.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Uniswap.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/UniswapFactory.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/UniswapPair.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/cERC20.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.dbg.json +1 -1
- package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
- package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
- package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IStakingUpgrade.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/RewardsMinter.dbg.json +1 -1
- package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/MultiBaseGovernanceShareField.sol/MultiBaseGovernanceShareField.dbg.json +1 -1
- package/artifacts/contracts/governance/Reputation.sol/Reputation.dbg.json +1 -1
- package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
- package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +1 -1
- package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/IWrapper.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
- package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
- package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodReserveCDai.sol/ContributionCalc.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
- package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.dbg.json +1 -1
- package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.dbg.json +1 -1
- package/artifacts/contracts/staking/SimpleStaking.sol/SimpleStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/SimpleStakingV2.sol/SimpleStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.dbg.json +1 -1
- package/artifacts/contracts/staking/utils/StakingRewardsFixedAPY.sol/StakingRewardsFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.dbg.json +1 -1
- package/artifacts/contracts/token/ERC677.sol/ERC677.dbg.json +1 -1
- package/artifacts/contracts/token/ERC677.sol/ERC677Receiver.dbg.json +1 -1
- package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/IFeesFormula.sol/IFeesFormula.dbg.json +1 -1
- package/artifacts/contracts/token/MultichainFeeFormula.sol/MultichainFeeFormula.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ERC20Permit.sol/ERC20Permit.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ERC20Permit.sol/SelfApprove.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/IGoodDollarCustom.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/ISuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperToken.sol/ISuperToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperToken.sol/ISuperToken.json +5 -0
- package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +25 -2
- package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.json +7 -2
- package/artifacts/contracts/token/superfluid/SuperfluidToken.sol/SuperfluidToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxiable.sol/UUPSProxiable.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/Proxy.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.dbg.json +1 -1
- package/artifacts/contracts/utils/BulkProof.sol/BulkProof.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/DonateGDClone.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/IQuoterV2.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/ISwapRouter.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOContract.sol/DAOContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DSMath.sol/DSMath.dbg.json +1 -1
- package/artifacts/contracts/utils/DataTypes.sol/DataTypes.dbg.json +1 -1
- package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/IRouter.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/PausableControl.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.dbg.json +1 -1
- package/artifacts/contracts/utils/IdentityFix.sol/IdentityFix.dbg.json +1 -1
- package/artifacts/contracts/utils/MultiCall.sol/Multicall.dbg.json +1 -1
- package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/NameService.sol/NameService.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/OldMarketMaker.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.dbg.json +1 -1
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.dbg.json +1 -1
- package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.dbg.json +1 -1
- package/contracts/token/superfluid/ISuperToken.sol +1 -0
- package/contracts/token/superfluid/SuperGoodDollar.sol +11 -2
- package/contracts/token/superfluid/SuperToken.sol +8 -0
- package/dist/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.json +25 -2
- package/hardhat.config.ts +1 -1
- package/package.json +4 -3
- package/scripts/blockchainTestSetup.sh +1 -1
- package/test/faucet/Faucet.test.ts +63 -19
- package/test/faucet/FuseFaucet.test.ts +43 -14
- package/test/governance/ClaimersDistribution.test.ts +3 -3
- package/test/governance/CompoundVotingMachine.castvote.test.ts +3 -6
- package/test/governance/CompoundVotingMachine.crossblockchain.ts +2 -2
- package/test/governance/CompoundVotingMachine.daoscheme.ts +1 -1
- package/test/governance/CompoundVotingMachine.guardian.test.ts +4 -4
- package/test/governance/CompoundVotingMachine.propose.test.ts +8 -8
- package/test/governance/CompoundVotingMachine.state.test.ts +4 -4
- package/test/governance/GReputation.test.ts +6 -6
- package/test/governance/GoodDollarStaking.gd.test.ts +44 -71
- package/test/governance/GoodDollarStaking.good.test.ts +52 -73
- package/test/governance/GovernanceStaking.test.ts +1 -1
- package/test/governance/Reputation.test.ts +2 -2
- package/test/helpers.ts +1 -1
- package/test/identity/IdentityV2.test.ts +12 -12
- package/test/invite/InvitesV1.test.ts +6 -6
- package/test/invite/InvitesV2.test.ts +272 -81
- package/test/reserve/DistributionHelper.test.ts +232 -139
- package/test/reserve/GoodMarketMaker.test.ts +17 -17
- package/test/reserve/GoodReserveCDai.cap.test.ts +4 -4
- package/test/reserve/GoodReserveCDai.distribution.test.ts +64 -42
- package/test/reserve/GoodReserveCDai.gdx.test.ts +1 -1
- package/test/reserve/GoodReserveCDai.pause.test.ts +8 -8
- package/test/reserve/GoodReserveCDai.test.ts +307 -101
- package/test/reserve/GoodReserveCDai.uniswap.test.ts +1 -1
- package/test/staking/DonationsStaking.test.ts +2 -2
- package/test/staking/FuseStaking.test.ts +3 -3
- package/test/staking/GoodAaveStakingFactory.test.ts +2 -2
- package/test/staking/StakingRewards.test.ts +913 -320
- package/test/staking/StakingRewardsFixedAPY.test.ts +62 -66
- package/test/token/CeloGasToken.test.ts +2 -2
- package/test/token/GoodDollar.test.ts +5 -5
- package/test/token/SuperGoodDollar.test.ts +17 -13
- package/test/ubi/UBIScheme.test.ts +1 -1
- package/test/utils/AdminWallet.test.ts +10 -10
- package/test/utils/BuyAndBridgeHelper.test.ts +33 -9
- package/test/utils/GoodDollarMintBurnWrapper.test.ts +265 -113
- package/test/utils/NameService.test.ts +1 -1
- package/test/utils/ProxyFactory.test.ts +2 -2
- package/types/contracts/token/superfluid/SuperGoodDollar.ts +26 -0
- package/types/factories/contracts/token/superfluid/ISuperToken__factory.ts +5 -0
- package/types/factories/contracts/token/superfluid/SuperGoodDollar__factory.ts +24 -1
- package/types/factories/contracts/token/superfluid/SuperToken__factory.ts +6 -1
- 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(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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(
|
|
333
|
+
).revertedWith(/invalid deadline/);
|
|
334
334
|
|
|
335
335
|
await expect(
|
|
336
336
|
identity.connect(whitelisted).connectAccount(toconnect.address, "0x", 0)
|
|
337
|
-
).revertedWith(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
263
|
+
).to.revertedWith(/Only owner or avatar can perform this action/);
|
|
264
264
|
});
|
|
265
265
|
|
|
266
266
|
it("should set level by owner", async () => {
|