Skip to content

Commit

Permalink
add zero token amount check & golf (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
RensR authored Sep 27, 2023
1 parent 51912f5 commit 1f14684
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 55 deletions.
5 changes: 5 additions & 0 deletions contracts/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ ALL_FOUNDRY_PRODUCTS = llo-feeds functions shared ccip
snapshot: ## Make a snapshot for a specific product.
export FOUNDRY_PROFILE=$(FOUNDRY_PROFILE) && forge snapshot --nmt "testFuzz_\w{1,}?" --snap gas-snapshots/$(FOUNDRY_PROFILE).gas-snapshot

.PHONY: snapshot-diff
snapshot-diff: ## Make a snapshot for a specific product.
export FOUNDRY_PROFILE=$(FOUNDRY_PROFILE) && forge snapshot --nmt "testFuzz_\w{1,}?" --diff gas-snapshots/$(FOUNDRY_PROFILE).gas-snapshot


.PHONY: snapshot-all
snapshot-all: ## Make a snapshot for all products.
for foundry_profile in $(ALL_FOUNDRY_PRODUCTS) ; do \
Expand Down
91 changes: 46 additions & 45 deletions contracts/gas-snapshots/ccip.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ BurnMintERC677_burn:testPoolBurnRevertNotHealthyReverts() (gas: 58150)
BurnMintERC677_burn:testPoolBurnSuccess() (gas: 197641)
BurnMintERC677_mint:testPoolMintNotHealthyReverts() (gas: 55384)
BurnMintERC677_mint:testPoolMintSuccess() (gas: 93675)
CCIPClientExample_sanity:testExamples() (gas: 2216216)
CCIPClientExample_sanity:testExamples() (gas: 2213780)
CommitStore_constructor:testConstructorSuccess() (gas: 3307574)
CommitStore_isUnpausedAndARMHealthy:testARMSuccess() (gas: 71312)
CommitStore_report:testInvalidIntervalMinLargerThanMaxReverts() (gas: 26019)
Expand Down Expand Up @@ -86,7 +86,7 @@ CommitStore_verify:testPausedReverts() (gas: 18438)
CommitStore_verify:testTooManyLeavesReverts() (gas: 36830)
DefensiveExampleTest:testHappyPathSuccess() (gas: 174828)
DefensiveExampleTest:testRecovery() (gas: 399728)
E2E:testE2E_3MessagesSuccess_gas() (gas: 863336)
E2E:testE2E_3MessagesSuccess_gas() (gas: 863423)
EVM2EVMOffRamp__releaseOrMintTokens:testRateLimitErrorsReverts() (gas: 428056)
EVM2EVMOffRamp__releaseOrMintTokens:testTokenHandlingErrorReverts() (gas: 100322)
EVM2EVMOffRamp__releaseOrMintTokens:testUnsupportedTokenReverts() (gas: 18159)
Expand Down Expand Up @@ -165,32 +165,33 @@ EVM2EVMOnRamp_applyPoolUpdates:testOnlyCallableByOwnerReverts() (gas: 23154)
EVM2EVMOnRamp_applyPoolUpdates:testPoolAlreadyExistsReverts() (gas: 351576)
EVM2EVMOnRamp_applyPoolUpdates:testPoolDoesNotExistReverts() (gas: 277882)
EVM2EVMOnRamp_applyPoolUpdates:testRemoveTokenPoolMismatchReverts() (gas: 616024)
EVM2EVMOnRamp_constructor:testConstructorSuccess() (gas: 5751237)
EVM2EVMOnRamp_forwardFromRouter:testForwardFromRouterSuccess() (gas: 129700)
EVM2EVMOnRamp_forwardFromRouter:testForwardFromRouterSuccessCustomExtraArgs() (gas: 130012)
EVM2EVMOnRamp_forwardFromRouter:testForwardFromRouterSuccessLegacyExtraArgs() (gas: 140431)
EVM2EVMOnRamp_constructor:testConstructorSuccess() (gas: 5774116)
EVM2EVMOnRamp_forwardFromRouter:testCannotSendZeroTokensReverts() (gas: 31534)
EVM2EVMOnRamp_forwardFromRouter:testForwardFromRouterSuccess() (gas: 126628)
EVM2EVMOnRamp_forwardFromRouter:testForwardFromRouterSuccessCustomExtraArgs() (gas: 126940)
EVM2EVMOnRamp_forwardFromRouter:testForwardFromRouterSuccessLegacyExtraArgs() (gas: 137359)
EVM2EVMOnRamp_forwardFromRouter:testInvalidAddressEncodePackedReverts() (gas: 23964)
EVM2EVMOnRamp_forwardFromRouter:testInvalidAddressReverts() (gas: 24263)
EVM2EVMOnRamp_forwardFromRouter:testInvalidExtraArgsTagReverts() (gas: 23242)
EVM2EVMOnRamp_forwardFromRouter:testMaxCapacityExceededReverts() (gas: 76555)
EVM2EVMOnRamp_forwardFromRouter:testMaxFeeBalanceReachedReverts() (gas: 34884)
EVM2EVMOnRamp_forwardFromRouter:testMessageGasLimitTooHighReverts() (gas: 26896)
EVM2EVMOnRamp_forwardFromRouter:testMessageTooLargeReverts() (gas: 105433)
EVM2EVMOnRamp_forwardFromRouter:testOriginalSenderReverts() (gas: 20187)
EVM2EVMOnRamp_forwardFromRouter:testPausedReverts() (gas: 49590)
EVM2EVMOnRamp_forwardFromRouter:testPermissionsReverts() (gas: 26792)
EVM2EVMOnRamp_forwardFromRouter:testPriceNotFoundForTokenReverts() (gas: 34382)
EVM2EVMOnRamp_forwardFromRouter:testShouldIncrementSeqNumAndNonceSuccess() (gas: 173601)
EVM2EVMOnRamp_forwardFromRouter:testShouldStoreLinkFees() (gas: 107444)
EVM2EVMOnRamp_forwardFromRouter:testShouldStoreNonLinkFees() (gas: 126675)
EVM2EVMOnRamp_forwardFromRouter:testTooManyTokensReverts() (gas: 28108)
EVM2EVMOnRamp_forwardFromRouter:testUnhealthyReverts() (gas: 42943)
EVM2EVMOnRamp_forwardFromRouter:testUnsupportedTokenReverts() (gas: 108788)
EVM2EVMOnRamp_forwardFromRouter:testZeroAddressReceiverReverts() (gas: 154470)
EVM2EVMOnRamp_forwardFromRouter_upgrade:testV2NonceNewSenderStartsAtZeroSuccess() (gas: 148038)
EVM2EVMOnRamp_forwardFromRouter_upgrade:testV2NonceStartsAtV1NonceSuccess() (gas: 191992)
EVM2EVMOnRamp_forwardFromRouter_upgrade:testV2SenderNoncesReadsPreviousRampSuccess() (gas: 117859)
EVM2EVMOnRamp_forwardFromRouter_upgrade:testV2Success() (gas: 95276)
EVM2EVMOnRamp_forwardFromRouter:testInvalidExtraArgsTagReverts() (gas: 23265)
EVM2EVMOnRamp_forwardFromRouter:testMaxCapacityExceededReverts() (gas: 77006)
EVM2EVMOnRamp_forwardFromRouter:testMaxFeeBalanceReachedReverts() (gas: 32218)
EVM2EVMOnRamp_forwardFromRouter:testMessageGasLimitTooHighReverts() (gas: 26907)
EVM2EVMOnRamp_forwardFromRouter:testMessageTooLargeReverts() (gas: 105488)
EVM2EVMOnRamp_forwardFromRouter:testOriginalSenderReverts() (gas: 20165)
EVM2EVMOnRamp_forwardFromRouter:testPausedReverts() (gas: 49568)
EVM2EVMOnRamp_forwardFromRouter:testPermissionsReverts() (gas: 26836)
EVM2EVMOnRamp_forwardFromRouter:testPriceNotFoundForTokenReverts() (gas: 34938)
EVM2EVMOnRamp_forwardFromRouter:testShouldIncrementSeqNumAndNonceSuccess() (gas: 168385)
EVM2EVMOnRamp_forwardFromRouter:testShouldStoreLinkFees() (gas: 104372)
EVM2EVMOnRamp_forwardFromRouter:testShouldStoreNonLinkFees() (gas: 123580)
EVM2EVMOnRamp_forwardFromRouter:testTooManyTokensReverts() (gas: 28119)
EVM2EVMOnRamp_forwardFromRouter:testUnhealthyReverts() (gas: 42966)
EVM2EVMOnRamp_forwardFromRouter:testUnsupportedTokenReverts() (gas: 108831)
EVM2EVMOnRamp_forwardFromRouter:testZeroAddressReceiverReverts() (gas: 154448)
EVM2EVMOnRamp_forwardFromRouter_upgrade:testV2NonceNewSenderStartsAtZeroSuccess() (gas: 141893)
EVM2EVMOnRamp_forwardFromRouter_upgrade:testV2NonceStartsAtV1NonceSuccess() (gas: 184775)
EVM2EVMOnRamp_forwardFromRouter_upgrade:testV2SenderNoncesReadsPreviousRampSuccess() (gas: 112643)
EVM2EVMOnRamp_forwardFromRouter_upgrade:testV2Success() (gas: 92203)
EVM2EVMOnRamp_getDataAvailabilityCostUSD:testEmptyMessageCalculatesDataAvailabilityCostSuccess() (gas: 15075)
EVM2EVMOnRamp_getDataAvailabilityCostUSD:testSimpleMessageCalculatesDataAvailabilityCostSuccess() (gas: 15388)
EVM2EVMOnRamp_getExpectedNextSequenceNumber:testGetExpectedNextSequenceNumberSuccess() (gas: 7860)
Expand Down Expand Up @@ -224,7 +225,7 @@ EVM2EVMOnRamp_payNops:testNoFeesToPayReverts() (gas: 131481)
EVM2EVMOnRamp_payNops:testNoNopsToPayReverts() (gas: 136500)
EVM2EVMOnRamp_payNops:testNopPayNopsSuccess() (gas: 149589)
EVM2EVMOnRamp_payNops:testOwnerPayNopsSuccess() (gas: 144225)
EVM2EVMOnRamp_payNops:testPayNopsSuccessAfterSetNops() (gas: 302426)
EVM2EVMOnRamp_payNops:testPayNopsSuccessAfterSetNops() (gas: 299354)
EVM2EVMOnRamp_payNops:testWrongPermissionsReverts() (gas: 19467)
EVM2EVMOnRamp_setDynamicConfig:testSetConfigInvalidConfigReverts() (gas: 37031)
EVM2EVMOnRamp_setDynamicConfig:testSetConfigOnlyOwnerReverts() (gas: 25795)
Expand All @@ -233,10 +234,10 @@ EVM2EVMOnRamp_setFeeTokenConfig:testOnlyCallableByOwnerOrAdminReverts() (gas: 17
EVM2EVMOnRamp_setFeeTokenConfig:testSetFeeTokenConfigByAdminSuccess() (gas: 20586)
EVM2EVMOnRamp_setFeeTokenConfig:testSetFeeTokenConfigSuccess() (gas: 13950)
EVM2EVMOnRamp_setNops:testAdminCanSetNopsSuccess() (gas: 65220)
EVM2EVMOnRamp_setNops:testIncludesPaymentSuccess() (gas: 437782)
EVM2EVMOnRamp_setNops:testIncludesPaymentSuccess() (gas: 434710)
EVM2EVMOnRamp_setNops:testLinkTokenCannotBeNopReverts() (gas: 57250)
EVM2EVMOnRamp_setNops:testNonOwnerOrAdminReverts() (gas: 18777)
EVM2EVMOnRamp_setNops:testNotEnoughFundsForPayoutReverts() (gas: 88807)
EVM2EVMOnRamp_setNops:testNotEnoughFundsForPayoutReverts() (gas: 85735)
EVM2EVMOnRamp_setNops:testSetNopsRemovesOldNopsCompletelySuccess() (gas: 63408)
EVM2EVMOnRamp_setNops:testSetNopsSuccess() (gas: 170843)
EVM2EVMOnRamp_setNops:testTooManyNopsReverts() (gas: 190362)
Expand All @@ -245,9 +246,9 @@ EVM2EVMOnRamp_setTokenTransferFeeConfig:testOnlyCallableByOwnerOrAdminReverts()
EVM2EVMOnRamp_setTokenTransferFeeConfig:testSetFeeTokenConfigByAdminSuccess() (gas: 20647)
EVM2EVMOnRamp_setTokenTransferFeeConfig:testSetFeeTokenConfigSuccess() (gas: 50282)
EVM2EVMOnRamp_withdrawNonLinkFees:testInvalidTokenReverts() (gas: 15094)
EVM2EVMOnRamp_withdrawNonLinkFees:testLinkBalanceNotSettledReverts() (gas: 87310)
EVM2EVMOnRamp_withdrawNonLinkFees:testLinkBalanceNotSettledReverts() (gas: 84238)
EVM2EVMOnRamp_withdrawNonLinkFees:testNonOwnerOrAdminReverts() (gas: 19453)
EVM2EVMOnRamp_withdrawNonLinkFees:testSettlingBalanceSuccess() (gas: 247054)
EVM2EVMOnRamp_withdrawNonLinkFees:testSettlingBalanceSuccess() (gas: 244596)
EVM2EVMOnRamp_withdrawNonLinkFees:testWithdrawNonLinkFeesSuccess() (gas: 50104)
EVM2EVMOnRamp_withdrawNonLinkFees:testWithdrawToZeroAddressReverts() (gas: 12913)
LockReleaseTokenPool_addLiquidity:testLiquidityNotAcceptedReverts() (gas: 2509153)
Expand Down Expand Up @@ -288,10 +289,10 @@ OCR2Base_transmit:testTransmit2SignersSuccess_gas() (gas: 51741)
OCR2Base_transmit:testUnAuthorizedTransmitterReverts() (gas: 23441)
OCR2Base_transmit:testUnauthorizedSignerReverts() (gas: 43661)
OCR2Base_transmit:testWrongNumberOfSignaturesReverts() (gas: 20507)
OnRampTokenPoolReentrancy:testSuccess() (gas: 332357)
PingPong_ccipReceive:testCcipReceiveSuccess() (gas: 149169)
OnRampTokenPoolReentrancy:testSuccess() (gas: 332065)
PingPong_ccipReceive:testCcipReceiveSuccess() (gas: 146097)
PingPong_plumbing:testPausingSuccess() (gas: 14471)
PingPong_startPingPong:testStartPingPongSuccess() (gas: 174247)
PingPong_startPingPong:testStartPingPongSuccess() (gas: 171175)
PriceRegistry_applyFeeTokensUpdates:testApplyFeeTokensUpdatesSuccess() (gas: 77674)
PriceRegistry_applyFeeTokensUpdates:testOnlyCallableByOwnerReverts() (gas: 16598)
PriceRegistry_applyPriceUpdatersUpdates:testApplyPriceUpdaterUpdatesSuccess() (gas: 80774)
Expand Down Expand Up @@ -331,21 +332,21 @@ Router_applyRampUpdates:testOffRampDisable() (gas: 192139)
Router_applyRampUpdates:testOffRampMismatchReverts() (gas: 108518)
Router_applyRampUpdates:testOnRampDisable() (gas: 52147)
Router_applyRampUpdates:testOnlyOwnerReverts() (gas: 12224)
Router_ccipSend:testCCIPSendLinkFeeNoTokenSuccess_gas() (gas: 113310)
Router_ccipSend:testCCIPSendLinkFeeOneTokenSuccess_gas() (gas: 188462)
Router_ccipSend:testCCIPSendNativeFeeNoTokenSuccess_gas() (gas: 125362)
Router_ccipSend:testCCIPSendNativeFeeOneTokenSuccess_gas() (gas: 200514)
Router_ccipSend:testCCIPSendLinkFeeNoTokenSuccess_gas() (gas: 110238)
Router_ccipSend:testCCIPSendLinkFeeOneTokenSuccess_gas() (gas: 188316)
Router_ccipSend:testCCIPSendNativeFeeNoTokenSuccess_gas() (gas: 122289)
Router_ccipSend:testCCIPSendNativeFeeOneTokenSuccess_gas() (gas: 200368)
Router_ccipSend:testFeeTokenAmountTooLowReverts() (gas: 61367)
Router_ccipSend:testInvalidMsgValue() (gas: 31860)
Router_ccipSend:testNativeFeeTokenInsufficientValue() (gas: 64237)
Router_ccipSend:testNativeFeeTokenOverpaySuccess() (gas: 164996)
Router_ccipSend:testNativeFeeTokenSuccess() (gas: 164337)
Router_ccipSend:testNativeFeeTokenOverpaySuccess() (gas: 161923)
Router_ccipSend:testNativeFeeTokenSuccess() (gas: 161264)
Router_ccipSend:testNativeFeeTokenZeroValue() (gas: 51217)
Router_ccipSend:testNonLinkFeeTokenSuccess() (gas: 236538)
Router_ccipSend:testNonLinkFeeTokenSuccess() (gas: 233465)
Router_ccipSend:testUnsupportedDestinationChainReverts() (gas: 24624)
Router_ccipSend:testWhenNotHealthyReverts() (gas: 44650)
Router_ccipSend:testWrappedNativeFeeTokenSuccess() (gas: 166436)
Router_ccipSend:testZeroFeeAndGasPriceSuccess() (gas: 232273)
Router_ccipSend:testWrappedNativeFeeTokenSuccess() (gas: 163363)
Router_ccipSend:testZeroFeeAndGasPriceSuccess() (gas: 229200)
Router_constructor:testConstructorSuccess() (gas: 9929)
Router_getFee:testGetFeeSupportedChainSuccess() (gas: 38866)
Router_getFee:testUnsupportedDestinationChainReverts() (gas: 17079)
Expand Down Expand Up @@ -380,9 +381,9 @@ TokenPool_setOnRampRateLimiterConfig:testOnlyOwnerReverts() (gas: 17999)
TokenProxy_ccipSend:testCcipSendGasShouldBeZeroReverts() (gas: 17053)
TokenProxy_ccipSend:testCcipSendInsufficientAllowanceReverts() (gas: 127348)
TokenProxy_ccipSend:testCcipSendInvalidTokenReverts() (gas: 15839)
TokenProxy_ccipSend:testCcipSendNativeSuccess() (gas: 229473)
TokenProxy_ccipSend:testCcipSendNativeSuccess() (gas: 229327)
TokenProxy_ccipSend:testCcipSendNoDataAllowedReverts() (gas: 16167)
TokenProxy_ccipSend:testCcipSendSuccess() (gas: 249348)
TokenProxy_ccipSend:testCcipSendSuccess() (gas: 249231)
TokenProxy_constructor:testConstructor() (gas: 10651)
TokenProxy_getFee:testGetFeeGasShouldBeZeroReverts() (gas: 16734)
TokenProxy_getFee:testGetFeeInvalidTokenReverts() (gas: 12616)
Expand Down
23 changes: 16 additions & 7 deletions contracts/src/v0.8/ccip/onRamp/EVM2EVMOnRamp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.0/contracts/token/
import {EnumerableMap} from "../../vendor/openzeppelin-solidity/v4.8.0/contracts/utils/structs/EnumerableMap.sol";

/// @notice The onRamp is a contract that handles lane-specific fee logic, NOP payments and
/// bridegable token support.
/// bridgeable token support.
/// @dev The EVM2EVMOnRamp, CommitStore and EVM2EVMOffRamp form an xchain upgradeable unit. Any change to one of them
/// results an onchain upgrade of all 3.
contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter, TypeAndVersionInterface {
Expand Down Expand Up @@ -54,6 +54,7 @@ contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter,
error LinkBalanceNotSettled();
error InvalidNopAddress(address nop);
error NotAFeeToken(address token);
error CannotSendZeroTokens();

event ConfigSet(StaticConfig staticConfig, DynamicConfig dynamicConfig);
event NopPaid(address indexed nop, uint256 amount);
Expand Down Expand Up @@ -83,7 +84,7 @@ contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter,
uint16 destGasPerPayloadByte; // │ Destination chain gas charged per byte of `data` payload
uint32 destDataAvailabilityOverheadGas; // │ Extra data availability gas charged on top of message data
uint16 destGasPerDataAvailabilityByte; // ──╯ Amount of gas to charge per byte of data that needs availability
uint16 destDataAvailabilityMultiplier; // ──╮ Multiplier for data availability gas, multples of 1e-4, or 0.0001
uint16 destDataAvailabilityMultiplier; // ──╮ Multiplier for data availability gas, multiples of 1e-4, or 0.0001
address priceRegistry; // │ Price registry address
uint32 maxDataSize; // │ Maximum payload data size, max 4GB
uint32 maxGasLimit; // ─────────────────────╯ Maximum gas limit for messages targeting EVMs, max 4 Billion gas
Expand Down Expand Up @@ -270,10 +271,18 @@ contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter,

uint256 gasLimit = _fromBytes(message.extraArgs).gasLimit;
// Validate the message with various checks
_validateMessage(message.data.length, gasLimit, message.tokenAmounts.length);

// Rate limit on aggregated token value
_rateLimitValue(message.tokenAmounts, IPriceRegistry(s_dynamicConfig.priceRegistry));
uint256 numberOfTokens = message.tokenAmounts.length;
_validateMessage(message.data.length, gasLimit, numberOfTokens);

// Only check token value if there are tokens
if (numberOfTokens > 0) {
for (uint256 i = 0; i < numberOfTokens; ++i) {
if (message.tokenAmounts[i].amount == 0) revert CannotSendZeroTokens();
}
// Rate limit on aggregated token value
_rateLimitValue(message.tokenAmounts, IPriceRegistry(s_dynamicConfig.priceRegistry));
}

// Convert feeToken to link if not already in link
if (message.feeToken == i_linkToken) {
Expand Down Expand Up @@ -306,13 +315,13 @@ contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter,
feeTokenAmount: feeTokenAmount,
data: message.data,
tokenAmounts: message.tokenAmounts,
sourceTokenData: new bytes[](message.tokenAmounts.length), // will be filled in later
sourceTokenData: new bytes[](numberOfTokens), // will be filled in later
messageId: ""
});

// Lock the tokens as last step. TokenPools may not always be trusted.
// There should be no state changes after external call to TokenPools.
for (uint256 i = 0; i < message.tokenAmounts.length; ++i) {
for (uint256 i = 0; i < numberOfTokens; ++i) {
Client.EVMTokenAmount memory tokenAndAmount = message.tokenAmounts[i];
newMessage.sourceTokenData[i] = getPoolBySourceToken(IERC20(tokenAndAmount.token)).lockOrBurn(
originalSender,
Expand Down
10 changes: 10 additions & 0 deletions contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRamp.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,15 @@ contract EVM2EVMOnRamp_forwardFromRouter is EVM2EVMOnRampSetup {
s_onRamp.forwardFromRouter(message, 0, STRANGER);
}

function testCannotSendZeroTokensReverts() public {
Client.EVM2AnyMessage memory message = _generateEmptyMessage();
message.tokenAmounts = new Client.EVMTokenAmount[](1);
message.tokenAmounts[0].amount = 0;
message.tokenAmounts[0].token = s_sourceTokens[0];
vm.expectRevert(EVM2EVMOnRamp.CannotSendZeroTokens.selector);
s_onRamp.forwardFromRouter(message, 0, STRANGER);
}

function testUnsupportedTokenReverts() public {
address wrongToken = address(1);

Expand Down Expand Up @@ -479,6 +488,7 @@ contract EVM2EVMOnRamp_forwardFromRouter is EVM2EVMOnRampSetup {
address fakeToken = address(1);
message.tokenAmounts = new Client.EVMTokenAmount[](1);
message.tokenAmounts[0].token = fakeToken;
message.tokenAmounts[0].amount = 1;

vm.expectRevert(abi.encodeWithSelector(AggregateRateLimiter.PriceNotFoundForToken.selector, fakeToken));

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ commit_store_helper: ../../../contracts/solc/v0.8.19/CommitStoreHelper.abi ../..
custom_token_pool: ../../../contracts/solc/v0.8.19/CustomTokenPool.abi ../../../contracts/solc/v0.8.19/CustomTokenPool.bin 79ab937aa4493bf31fb0e57affd00555aad75205c90268e89674c28ea9e5e48f
evm_2_evm_offramp: ../../../contracts/solc/v0.8.19/EVM2EVMOffRamp.abi ../../../contracts/solc/v0.8.19/EVM2EVMOffRamp.bin 8a0bd8a428ae8d071d326a2d4e1f7a2d35da08fef7307b6e1f15e108eb23770e
evm_2_evm_offramp_helper: ../../../contracts/solc/v0.8.19/EVM2EVMOffRampHelper.abi ../../../contracts/solc/v0.8.19/EVM2EVMOffRampHelper.bin 9e06fb409bcc9b1728c1a327d404640796c2834e7798728224b8ad4e5745c4a7
evm_2_evm_onramp: ../../../contracts/solc/v0.8.19/EVM2EVMOnRamp.abi ../../../contracts/solc/v0.8.19/EVM2EVMOnRamp.bin 9623760aeacc020a7c5b1ebf67147db69a361b1344b23ad540df49c4b668c408
evm_2_evm_onramp: ../../../contracts/solc/v0.8.19/EVM2EVMOnRamp.abi ../../../contracts/solc/v0.8.19/EVM2EVMOnRamp.bin 1c21fbc9b49521a9a783c40b0674297bfcb18a64100dae10173682e38ea199fc
lock_release_token_pool: ../../../contracts/solc/v0.8.19/LockReleaseTokenPool.abi ../../../contracts/solc/v0.8.19/LockReleaseTokenPool.bin 7f7a28f55f9fb63669cd8038a7f99e31431acd6d15ddeeb6a77188eb0bf85d58
maybe_revert_message_receiver: ../../../contracts/solc/v0.8.19/MaybeRevertMessageReceiver.abi ../../../contracts/solc/v0.8.19/MaybeRevertMessageReceiver.bin aaa90eac8cc555ee4b0fbe57d1fb8d72d6689b29510b238177c97ab9b7979ac5
mock_arm_contract: ../../../contracts/solc/v0.8.19/MockARM.abi ../../../contracts/solc/v0.8.19/MockARM.bin efcf4cb260a2b6a6e189639f62bb50ab650a135715c1fcd42c92dfa9d04aa0e3
Expand Down

0 comments on commit 1f14684

Please sign in to comment.