From 39dddad4d2d34de12a73ec154c82b3d02638f013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20=27birdy=27=20Danjou?= Date: Thu, 23 Nov 2023 19:09:05 +0100 Subject: [PATCH] fix() rename to whitelisted --- examples/Identity/AbstractCompliantERC20.sol | 2 +- examples/Identity/ERC20Rules.sol | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/Identity/AbstractCompliantERC20.sol b/examples/Identity/AbstractCompliantERC20.sol index 1da325eb..9e1e5c44 100644 --- a/examples/Identity/AbstractCompliantERC20.sol +++ b/examples/Identity/AbstractCompliantERC20.sol @@ -34,7 +34,7 @@ abstract contract AbstractCompliantERC20 is EIP712WithModifier { return TFHE.reencrypt(balances[msg.sender], publicKey, 0); } - uint32 userCountry = rulesContract.countryWallets(msg.sender); + uint32 userCountry = rulesContract.whitelistedWallets(msg.sender); require(userCountry > 0, "You're not registered as a country wallet"); euint32 walletCountry = identityContract.getIdentifier(wallet, "country"); diff --git a/examples/Identity/ERC20Rules.sol b/examples/Identity/ERC20Rules.sol index 378c4ce4..8a8149fa 100644 --- a/examples/Identity/ERC20Rules.sol +++ b/examples/Identity/ERC20Rules.sol @@ -12,14 +12,14 @@ interface ICompliantERC20 { contract ERC20Rules { string[] public identifiers; - mapping(address => uint32) public countryWallets; + mapping(address => uint32) public whitelistedWallets; mapping(string => uint8) public countries; uint16[] public country2CountryRestrictions; constructor() { identifiers = ["country", "blacklist"]; - countryWallets[address(0x133725C6461120439E85887C7639316CB27a2D9d)] = 1; - countryWallets[address(0x4CaCeF78615AFecEf7eF182CfbD243195Fc90a29)] = 2; + whitelistedWallets[address(0x133725C6461120439E85887C7639316CB27a2D9d)] = 1; + whitelistedWallets[address(0x4CaCeF78615AFecEf7eF182CfbD243195Fc90a29)] = 2; countries["fr"] = 1; countries["us"] = 2;