Skip to content

Commit 2d55e25

Browse files
committed
remove redundant check + fix spelling
1 parent 0b442ba commit 2d55e25

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

ccv/chains/evm/gobindings/generated/latest/siloed_usdc_token_pool/siloed_usdc_token_pool.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chains/evm/.gas-snapshot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,9 @@ SiloedUSDCTokenPool_lockOrBurn:test_lockOrBurn_UpdatesLockedTokensAccounting() (
516516
SiloedUSDCTokenPool_lockOrBurn:test_lockOrBurn_UpdatesSiloedTokensAccounting() (gas: 103700)
517517
SiloedUSDCTokenPool_proposeCCTPMigration:test_proposeCCTPMigration() (gas: 38080)
518518
SiloedUSDCTokenPool_proposeCCTPMigration:test_proposeCCTPMigration_AfterCancellation() (gas: 50832)
519-
SiloedUSDCTokenPool_releaseOrMint:test_releaseOrMintV2_Success() (gas: 156747)
520-
SiloedUSDCTokenPool_releaseOrMint:test_releaseOrMint_SubtractsFromExcludedTokens() (gas: 376786)
521-
SiloedUSDCTokenPool_releaseOrMint:test_releaseOrMint_Success() (gas: 159417)
519+
SiloedUSDCTokenPool_releaseOrMint:test_releaseOrMintV2_Success() (gas: 154798)
520+
SiloedUSDCTokenPool_releaseOrMint:test_releaseOrMint_SubtractsFromExcludedTokens() (gas: 372888)
521+
SiloedUSDCTokenPool_releaseOrMint:test_releaseOrMint_Success() (gas: 157468)
522522
SiloedUSDCTokenPool_typeAndVersion:test_typeAndVersion() (gas: 9927)
523523
TokenAdminRegistry_acceptAdminRole:test_acceptAdminRole() (gas: 45424)
524524
TokenAdminRegistry_addRegistryModule:test_addRegistryModule() (gas: 67792)

chains/evm/contracts/pools/USDC/SiloedUSDCTokenPool.sol

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,16 @@ contract SiloedUSDCTokenPool is SiloedLockReleaseTokenPool, AuthorizedCallers {
8585

8686
_validateReleaseOrMint(releaseOrMintIn, localAmount, blockConfirmationRequested);
8787

88-
ILockBox lockbox = _getLockBox(releaseOrMintIn.remoteChainSelector);
89-
uint256 availableLiquidity = i_token.balanceOf(address(lockbox));
90-
if (localAmount > availableLiquidity) {
91-
revert InsufficientLiquidity(availableLiquidity, localAmount);
92-
}
93-
9488
uint256 excludedTokens = s_tokensExcludedFromBurn[releaseOrMintIn.remoteChainSelector];
9589
if (excludedTokens != 0) {
96-
// The existence of excluded tokens indicates a migration has occured on the chain, and that any tokens
90+
// The existence of excluded tokens indicates a migration has occurred on the chain, and that any tokens
9791
// being released should come from those excluded tokens reserved for processing inflight messages.
9892
if (localAmount > excludedTokens) revert InsufficientLiquidity(excludedTokens, localAmount);
9993
s_tokensExcludedFromBurn[releaseOrMintIn.remoteChainSelector] -= localAmount;
10094
// During a proposed migration, the lockbox balance is the source of truth. Any release here reduces the
10195
// lockbox balance, so burnLockedUSDC will not over-burn even without separate per-chain accounting.
10296
}
103-
// No excluded tokens is the common path, as it means no migration has occured yet, and any released
97+
// No excluded tokens is the common path, as it means no migration has occurred yet, and any released
10498
// tokens should come from the stored token balance of previously deposited tokens.
10599

106100
// Release to the recipient using the lockbox tied to the remote chain selector.

chains/evm/gobindings/generation/generated-wrapper-dependency-versions-do-not-edit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ rmn_proxy_contract: ../solc/ccip/RMNProxy/RMNProxy.sol/RMNProxy.abi.json ../solc
4242
rmn_remote: ../solc/ccip/RMNRemote/RMNRemote.sol/RMNRemote.abi.json ../solc/ccip/RMNRemote/RMNRemote.sol/RMNRemote.bin e345511af2c05588a6875c9c5cc728732e8728e76217caa3de3966b0051b0ad2
4343
router: ../solc/ccip/Router/Router.sol/Router.abi.json ../solc/ccip/Router/Router.sol/Router.bin 4048d8be7531670b5e054b7dc18aa8394f2b6dd44fd7fff83aa0cb4aeb38e926
4444
siloed_lock_release_token_pool: ../solc/ccip/SiloedLockReleaseTokenPool/SiloedLockReleaseTokenPool.sol/SiloedLockReleaseTokenPool.abi.json ../solc/ccip/SiloedLockReleaseTokenPool/SiloedLockReleaseTokenPool.sol/SiloedLockReleaseTokenPool.bin caeb6312ea1b78f51e11873faa7bf95db0b966148e9416871ee896d8b25db213
45-
siloed_usdc_token_pool: ../solc/ccip/SiloedUSDCTokenPool/SiloedUSDCTokenPool.sol/SiloedUSDCTokenPool.abi.json ../solc/ccip/SiloedUSDCTokenPool/SiloedUSDCTokenPool.sol/SiloedUSDCTokenPool.bin b3f40f7b4c5ff9095bb3a7171ad77fd395fbe2706b50a48a6773ad8ffbe75333
45+
siloed_usdc_token_pool: ../solc/ccip/SiloedUSDCTokenPool/SiloedUSDCTokenPool.sol/SiloedUSDCTokenPool.abi.json ../solc/ccip/SiloedUSDCTokenPool/SiloedUSDCTokenPool.sol/SiloedUSDCTokenPool.bin 67fceba00fd91f20f5bac1c127dbb7543b1253989b1d2325ff3d59de7becd314
4646
token_admin_registry: ../solc/ccip/TokenAdminRegistry/TokenAdminRegistry.sol/TokenAdminRegistry.abi.json ../solc/ccip/TokenAdminRegistry/TokenAdminRegistry.sol/TokenAdminRegistry.bin 086268b9df56e089a69a96ce3e4fd03a07a00a1c8812ba9504e31930a5c3ff1d
4747
token_pool: ../solc/ccip/TokenPool/TokenPool.sol/TokenPool.abi.json ../solc/ccip/TokenPool/TokenPool.sol/TokenPool.bin 11ccfca8caeff8fc446fab8ffb72a91853a114dd3c8f6a52fa7a46324ef2db2b
4848
token_pool_factory: ../solc/ccip/TokenPoolFactory/TokenPoolFactory.sol/TokenPoolFactory.abi.json ../solc/ccip/TokenPoolFactory/TokenPoolFactory.sol/TokenPoolFactory.bin 0264e3b1d37b4d22028774f2516e37542684c6d1de17cb36096a17afbbc44b29

0 commit comments

Comments
 (0)