Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnogo committed Aug 5, 2024
1 parent ee31562 commit 631bfbc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
20 changes: 10 additions & 10 deletions contracts/gas-snapshots/ccip.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -641,17 +641,17 @@ OCR2Base_transmit:test_Transmit2SignersSuccess_gas() (gas: 51686)
OCR2Base_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 23484)
OCR2Base_transmit:test_UnauthorizedSigner_Revert() (gas: 39665)
OCR2Base_transmit:test_WrongNumberOfSignatures_Revert() (gas: 20557)
OnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 380360)
PingPong_ccipReceive:test_CcipReceive_Success() (gas: 150335)
OnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 390410)
PingPong_ccipReceive:test_CcipReceive_Success() (gas: 150360)
PingPong_plumbing:test_OutOfOrderExecution_Success() (gas: 17798)
PingPong_plumbing:test_Pausing_Success() (gas: 17777)
PingPong_startPingPong:test_StartPingPong_With_OOO_Success() (gas: 162054)
PingPong_startPingPong:test_StartPingPong_With_Sequenced_Ordered_Success() (gas: 182572)
PriceRegistry_applyDestChainConfigUpdates:test_InvalidChainFamilySelector_Revert() (gas: 16719)
PriceRegistry_applyDestChainConfigUpdates:test_InvalidDestBytesOverhead_Revert() (gas: 16784)
PriceRegistry_applyDestChainConfigUpdates:test_InvalidDestChainConfigDestChainSelectorEqZero_Revert() (gas: 16611)
PriceRegistry_applyDestChainConfigUpdates:test_applyDestChainConfigUpdatesDefaultTxGasLimitEqZero_Revert() (gas: 16675)
PriceRegistry_applyDestChainConfigUpdates:test_applyDestChainConfigUpdatesDefaultTxGasLimitGtMaxPerMessageGasLimit_Revert() (gas: 40953)
PingPong_startPingPong:test_StartPingPong_With_OOO_Success() (gas: 162053)
PingPong_startPingPong:test_StartPingPong_With_Sequenced_Ordered_Success() (gas: 182599)
PriceRegistry_applyDestChainConfigUpdates:test_InvalidChainFamilySelector_Revert() (gas: 16725)
PriceRegistry_applyDestChainConfigUpdates:test_InvalidDestBytesOverhead_Revert() (gas: 16816)
PriceRegistry_applyDestChainConfigUpdates:test_InvalidDestChainConfigDestChainSelectorEqZero_Revert() (gas: 16617)
PriceRegistry_applyDestChainConfigUpdates:test_applyDestChainConfigUpdatesDefaultTxGasLimitEqZero_Revert() (gas: 16681)
PriceRegistry_applyDestChainConfigUpdates:test_applyDestChainConfigUpdatesDefaultTxGasLimitGtMaxPerMessageGasLimit_Revert() (gas: 40971)
PriceRegistry_applyDestChainConfigUpdates:test_applyDestChainConfigUpdatesZeroIntput_Success() (gas: 12341)
PriceRegistry_applyDestChainConfigUpdates:test_applyDestChainConfigUpdates_Success() (gas: 139588)
PriceRegistry_applyFeeTokensUpdates:test_ApplyFeeTokensUpdates_Success() (gas: 80002)
Expand Down Expand Up @@ -859,7 +859,7 @@ Router_routeMessage:test_OnlyOffRamp_Revert() (gas: 25116)
Router_routeMessage:test_WhenNotHealthy_Revert() (gas: 44724)
Router_setWrappedNative:test_OnlyOwner_Revert() (gas: 10985)
SelfFundedPingPong_ccipReceive:test_FundingIfNotANop_Revert() (gas: 53521)
SelfFundedPingPong_ccipReceive:test_Funding_Success() (gas: 416840)
SelfFundedPingPong_ccipReceive:test_Funding_Success() (gas: 416990)
SelfFundedPingPong_setCountIncrBeforeFunding:test_setCountIncrBeforeFunding() (gas: 20139)
TokenAdminRegistry_acceptAdminRole:test_acceptAdminRole_OnlyPendingAdministrator_Revert() (gas: 51085)
TokenAdminRegistry_acceptAdminRole:test_acceptAdminRole_Success() (gas: 43947)
Expand Down
6 changes: 2 additions & 4 deletions contracts/src/v0.8/ccip/test/applications/PingPongDemo.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ contract PingPong_startPingPong is PingPongDappSetup {

function test_StartPingPong_With_Sequenced_Ordered_Success() public {
bytes memory data = abi.encode(pingPongNumber);
bytes memory extraArgs = Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: 2e5}));

Client.EVM2AnyMessage memory sentMessage = Client.EVM2AnyMessage({
receiver: abi.encode(i_pongContract),
data: data,
tokenAmounts: new Client.EVMTokenAmount[](0),
feeToken: s_sourceFeeToken,
extraArgs: extraArgs
extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: 2e5}))
});

uint256 expectedFee = s_sourceRouter.getFee(DEST_CHAIN_SELECTOR, sentMessage);
Expand Down Expand Up @@ -66,14 +65,13 @@ contract PingPong_startPingPong is PingPongDappSetup {
s_pingPong.setOutOfOrderExecution(true);

bytes memory data = abi.encode(pingPongNumber);
bytes memory extraArgs = Client._argsToBytes(Client.EVMExtraArgsV2({gasLimit: 2e5, allowOutOfOrderExecution: true}));

Client.EVM2AnyMessage memory sentMessage = Client.EVM2AnyMessage({
receiver: abi.encode(i_pongContract),
data: data,
tokenAmounts: new Client.EVMTokenAmount[](0),
feeToken: s_sourceFeeToken,
extraArgs: extraArgs
extraArgs: Client._argsToBytes(Client.EVMExtraArgsV2({gasLimit: 2e5, allowOutOfOrderExecution: true}))
});

uint256 expectedFee = s_sourceRouter.getFee(DEST_CHAIN_SELECTOR, sentMessage);
Expand Down

0 comments on commit 631bfbc

Please sign in to comment.