Skip to content

Commit

Permalink
chore(protocol): rename a state variable name in ERC20Vault (#17331)
Browse files Browse the repository at this point in the history
Co-authored-by: dantaik <[email protected]>
Co-authored-by: Keszey Dániel <[email protected]>
Co-authored-by: D <[email protected]>
  • Loading branch information
4 people authored May 25, 2024
1 parent f8042a2 commit af4a53b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/protocol/contract_layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
| __gap | uint256[50] | 251 | 0 | 1600 | contracts/tokenvault/ERC20Vault.sol:ERC20Vault |
| bridgedToCanonical | mapping(address => struct ERC20Vault.CanonicalERC20) | 301 | 0 | 32 | contracts/tokenvault/ERC20Vault.sol:ERC20Vault |
| canonicalToBridged | mapping(uint256 => mapping(address => address)) | 302 | 0 | 32 | contracts/tokenvault/ERC20Vault.sol:ERC20Vault |
| btokenBlacklist | mapping(address => bool) | 303 | 0 | 32 | contracts/tokenvault/ERC20Vault.sol:ERC20Vault |
| btokenDenylist | mapping(address => bool) | 303 | 0 | 32 | contracts/tokenvault/ERC20Vault.sol:ERC20Vault |
| lastMigrationStart | mapping(uint256 => mapping(address => uint256)) | 304 | 0 | 32 | contracts/tokenvault/ERC20Vault.sol:ERC20Vault |
| __gap | uint256[46] | 305 | 0 | 1472 | contracts/tokenvault/ERC20Vault.sol:ERC20Vault |

Expand Down
8 changes: 4 additions & 4 deletions packages/protocol/contracts/tokenvault/ERC20Vault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ contract ERC20Vault is BaseVault {
mapping(uint256 chainId => mapping(address ctoken => address btoken)) public canonicalToBridged;

/// @notice Mappings from bridged tokens to their blacklist status.
mapping(address btoken => bool blacklisted) public btokenBlacklist;
mapping(address btoken => bool denied) public btokenDenylist;

/// @notice Mappings from ctoken to its last migration timestamp.
mapping(uint256 chainId => mapping(address ctoken => uint256 timestamp)) public
Expand Down Expand Up @@ -180,7 +180,7 @@ contract ERC20Vault is BaseVault {
revert VAULT_INVALID_CTOKEN();
}

if (btokenBlacklist[_btokenNew]) revert VAULT_BTOKEN_BLACKLISTED();
if (btokenDenylist[_btokenNew]) revert VAULT_BTOKEN_BLACKLISTED();

uint256 _lastMigrationStart = lastMigrationStart[_ctoken.chainId][_ctoken.addr];
if (block.timestamp < _lastMigrationStart + MIN_MIGRATION_DELAY) {
Expand All @@ -198,7 +198,7 @@ contract ERC20Vault is BaseVault {
}

delete bridgedToCanonical[btokenOld_];
btokenBlacklist[btokenOld_] = true;
btokenDenylist[btokenOld_] = true;

// Start the migration
if (
Expand Down Expand Up @@ -239,7 +239,7 @@ contract ERC20Vault is BaseVault {
{
if (_op.amount == 0) revert VAULT_INVALID_AMOUNT();
if (_op.token == address(0)) revert VAULT_INVALID_TOKEN();
if (btokenBlacklist[_op.token]) revert VAULT_BTOKEN_BLACKLISTED();
if (btokenDenylist[_op.token]) revert VAULT_BTOKEN_BLACKLISTED();
if (msg.value < _op.fee) revert VAULT_INSURFICIENT_FEE();

(bytes memory data, CanonicalERC20 memory ctoken, uint256 balanceChange) =
Expand Down

0 comments on commit af4a53b

Please sign in to comment.