diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 60bd3a9b85..04def4f478 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -34,7 +34,10 @@ BurnWithFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28675) BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55158) BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 243568) BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24260) -CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2132183) +CCIPClientTest:test_ccipReceiveAndSendAck() (gas: 331271) +CCIPClientTest:test_ccipSendAndReceiveAck_in_return() (gas: 347022) +CCIPClientTest:test_ccipSend_withNonNativeFeetoken_andNoDestTokens() (gas: 241425) +CCIPClientTest:test_send_tokens_that_are_not_feeToken() (gas: 552000) CCIPConfigSetup:test_getCapabilityConfiguration_Success() (gas: 9495) CCIPConfig_ConfigStateMachine:test__computeConfigDigest_Success() (gas: 70755) CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_InitToRunning_Success() (gas: 357994) @@ -85,6 +88,21 @@ CCIPConfig_validateConfig:test__validateConfig_TooManyBootstrapP2PIds_Reverts() CCIPConfig_validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 1160583) CCIPConfig_validateConfig:test__validateConfig_TooManyTransmitters_Reverts() (gas: 1158919) CCIPConfig_validateConfig:test_getCapabilityConfiguration_Success() (gas: 9562) +CCIPReceiverTest:test_HappyPath_Success() (gas: 193588) +CCIPReceiverTest:test_Recovery_from_invalid_sender() (gas: 428817) +CCIPReceiverTest:test_Recovery_with_intentional_revert() (gas: 444784) +CCIPReceiverTest:test_disableChain_andRevert_onccipReceive_REVERT() (gas: 205094) +CCIPReceiverTest:test_removeSender_from_approvedList_and_revert() (gas: 425167) +CCIPReceiverTest:test_retryFailedMessage_Success() (gas: 420799) +CCIPReceiverTest:test_withdraw_nativeToken_to_owner() (gas: 18806) +CCIPReceiverWithAckTest:test_ccipReceive_ack_message() (gas: 55172) +CCIPReceiverWithAckTest:test_ccipReceive_and_respond_with_ack() (gas: 331323) +CCIPReceiverWithAckTest:test_ccipReceiver_ack_with_invalidAckMessageHeaderBytes_REVERT() (gas: 437616) +CCIPReceiverWithAckTest:test_feeTokenApproval_in_constructor() (gas: 2643085) +CCIPReceiverWithAckTest:test_modifyFeeToken() (gas: 72519) +CCIPSenderTest:test_ccipSend_withNonNativeFeetoken_andDestTokens() (gas: 339182) +CCIPSenderTest:test_ccipSend_withNonNativeFeetoken_andNoDestTokens() (gas: 224256) +CCIPSenderTest:test_ccipSend_with_NativeFeeToken_andDestTokens() (gas: 367940) CommitStore_constructor:test_Constructor_Success() (gas: 3091326) CommitStore_isUnpausedAndRMNHealthy:test_RMN_Success() (gas: 73420) CommitStore_report:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 28670) @@ -113,8 +131,6 @@ CommitStore_verify:test_Blessed_Success() (gas: 96389) CommitStore_verify:test_NotBlessed_Success() (gas: 61374) CommitStore_verify:test_Paused_Revert() (gas: 18496) CommitStore_verify:test_TooManyLeaves_Revert() (gas: 36785) -DefensiveExampleTest:test_HappyPath_Success() (gas: 200018) -DefensiveExampleTest:test_Recovery() (gas: 424253) E2E:test_E2E_3MessagesSuccess_gas() (gas: 1104821) EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 38361) EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 108455) @@ -193,7 +209,7 @@ EVM2EVMMultiOffRamp_executeSingleReport:test_NonExistingSourceChain_Revert() (ga EVM2EVMMultiOffRamp_executeSingleReport:test_ReceiverError_Success() (gas: 181595) EVM2EVMMultiOffRamp_executeSingleReport:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 189957) EVM2EVMMultiOffRamp_executeSingleReport:test_RootNotCommitted_Revert() (gas: 47044) -EVM2EVMMultiOffRamp_executeSingleReport:test_RouterYULCall_Revert() (gas: 434527) +EVM2EVMMultiOffRamp_executeSingleReport:test_RouterYULCall_Revert() (gas: 1408453) EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageNoTokensOtherChain_Success() (gas: 248935) EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageNoTokensUnordered_Success() (gas: 174421) EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageNoTokens_Success() (gas: 193347) @@ -219,8 +235,8 @@ EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouche EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 207222) EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 28130) EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 158903) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 505081) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails() (gas: 2379173) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 1479082) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails() (gas: 3171008) EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 209279) EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 209853) EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 664710) @@ -359,7 +375,7 @@ EVM2EVMOffRamp_execute:test_Paused_Revert() (gas: 101458) EVM2EVMOffRamp_execute:test_ReceiverError_Success() (gas: 165192) EVM2EVMOffRamp_execute:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 177948) EVM2EVMOffRamp_execute:test_RootNotCommitted_Revert() (gas: 41317) -EVM2EVMOffRamp_execute:test_RouterYULCall_Revert() (gas: 402597) +EVM2EVMOffRamp_execute:test_RouterYULCall_Revert() (gas: 1376538) EVM2EVMOffRamp_execute:test_SingleMessageNoTokensUnordered_Success() (gas: 159863) EVM2EVMOffRamp_execute:test_SingleMessageNoTokens_Success() (gas: 175094) EVM2EVMOffRamp_execute:test_SingleMessageToNonCCIPReceiver_Success() (gas: 248764) @@ -391,14 +407,14 @@ EVM2EVMOffRamp_execute_upgrade:test_V2_Success() (gas: 131906) EVM2EVMOffRamp_getAllRateLimitTokens:test_GetAllRateLimitTokens_Success() (gas: 38408) EVM2EVMOffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3213556) EVM2EVMOffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 83091) -EVM2EVMOffRamp_manuallyExecute:test_LowGasLimitManualExec_Success() (gas: 483813) +EVM2EVMOffRamp_manuallyExecute:test_LowGasLimitManualExec_Success() (gas: 1457911) EVM2EVMOffRamp_manuallyExecute:test_ManualExecFailedTx_Revert() (gas: 186809) EVM2EVMOffRamp_manuallyExecute:test_ManualExecForkedChain_Revert() (gas: 25894) EVM2EVMOffRamp_manuallyExecute:test_ManualExecGasLimitMismatch_Revert() (gas: 43519) EVM2EVMOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 26009) EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithGasOverride_Success() (gas: 189003) EVM2EVMOffRamp_manuallyExecute:test_ManualExec_Success() (gas: 188464) -EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails() (gas: 2027697) +EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails() (gas: 2844986) EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 144106) EVM2EVMOffRamp_metadataHash:test_MetadataHash_Success() (gas: 8871) EVM2EVMOffRamp_setDynamicConfig:test_NonOwner_Revert() (gas: 40429) @@ -504,27 +520,6 @@ EVM2EVMOnRamp_withdrawNonLinkFees:test_NonOwnerOrAdmin_Revert() (gas: 15293) EVM2EVMOnRamp_withdrawNonLinkFees:test_SettlingBalance_Success() (gas: 272260) EVM2EVMOnRamp_withdrawNonLinkFees:test_WithdrawNonLinkFees_Success() (gas: 53472) EVM2EVMOnRamp_withdrawNonLinkFees:test_WithdrawToZeroAddress_Revert() (gas: 12856) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 96729) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 47688) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 17384) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongTokenAmount() (gas: 15677) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_feeToken() (gas: 99741) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_native() (gas: 76096) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_weth() (gas: 99748) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_feeToken() (gas: 144569) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_native() (gas: 80259) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_nativeExcess() (gas: 80446) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_weth() (gas: 95713) -EtherSenderReceiverTest_constructor:test_constructor() (gas: 17511) -EtherSenderReceiverTest_getFee:test_getFee() (gas: 27289) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_reverts_feeToken_tokenAmountNotEqualToMsgValue() (gas: 20333) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_feeToken() (gas: 16715) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_native() (gas: 16654) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_dataOverwrittenToMsgSender() (gas: 25415) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrittenToMsgSender() (gas: 25265) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 17895) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 25287) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 26292) LockReleaseTokenPoolAndProxy_setRateLimitAdmin:test_SetRateLimitAdmin_Revert() (gas: 11058) LockReleaseTokenPoolAndProxy_setRateLimitAdmin:test_SetRateLimitAdmin_Success() (gas: 35097) LockReleaseTokenPoolAndProxy_setRebalancer:test_SetRebalancer_Revert() (gas: 10970) @@ -690,9 +685,9 @@ 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: 380711) -PingPong_ccipReceive:test_CcipReceive_Success() (gas: 148611) -PingPong_plumbing:test_Pausing_Success() (gas: 17803) -PingPong_startPingPong:test_StartPingPong_Success() (gas: 178547) +PingPong_example_ccipReceive:test_CcipReceive_Success() (gas: 308231) +PingPong_example_plumbing:test_Pausing_Success() (gas: 17898) +PingPong_example_startPingPong:test_StartPingPong_Success() (gas: 234226) PriceRegistry_applyFeeTokensUpdates:test_ApplyFeeTokensUpdates_Success() (gas: 79823) PriceRegistry_applyFeeTokensUpdates:test_OnlyCallableByOwner_Revert() (gas: 12580) PriceRegistry_constructor:test_InvalidStalenessThreshold_Revert() (gas: 67418) @@ -839,9 +834,9 @@ Router_routeMessage:test_ManualExec_Success() (gas: 35381) 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: 53600) -SelfFundedPingPong_ccipReceive:test_Funding_Success() (gas: 418231) -SelfFundedPingPong_setCountIncrBeforeFunding:test_setCountIncrBeforeFunding() (gas: 20157) +SelfFundedPingPong_ccipReceive:test_FundingIfNotANop_Revert() (gas: 290288) +SelfFundedPingPong_ccipReceive:test_Funding_Success() (gas: 451971) +SelfFundedPingPong_setCountIncrBeforeFunding:test_setCountIncrBeforeFunding() (gas: 20203) TokenAdminRegistry_acceptAdminRole:test_acceptAdminRole_OnlyPendingAdministrator_Revert() (gas: 51085) TokenAdminRegistry_acceptAdminRole:test_acceptAdminRole_Success() (gas: 43947) TokenAdminRegistry_addRegistryModule:test_addRegistryModule_OnlyOwner_Revert() (gas: 12629) diff --git a/contracts/scripts/native_solc_compile_all_ccip b/contracts/scripts/native_solc_compile_all_ccip index b00071c9b3..284e76ba37 100755 --- a/contracts/scripts/native_solc_compile_all_ccip +++ b/contracts/scripts/native_solc_compile_all_ccip @@ -54,9 +54,12 @@ compileContract () { # Contracts should be ordered in reverse-import-complexity-order to minimize overwrite risks. compileContract ccip/offRamp/EVM2EVMOffRamp.sol compileContract ccip/offRamp/EVM2EVMMultiOffRamp.sol -compileContract ccip/applications/PingPongDemo.sol -compileContract ccip/applications/SelfFundedPingPong.sol -compileContract ccip/applications/EtherSenderReceiver.sol +compileContract ccip/applications/internal/PingPongDemo.sol +compileContract ccip/applications/internal/SelfFundedPingPong.sol +compileContract ccip/applications/external/CCIPClient.sol +compileContract ccip/applications/external/CCIPReceiver.sol +compileContract ccip/applications/external/CCIPReceiverWithACK.sol +compileContract ccip/applications/external/CCIPSender.sol compileContract ccip/onRamp/EVM2EVMMultiOnRamp.sol compileContract ccip/onRamp/EVM2EVMOnRamp.sol compileContract ccip/CommitStore.sol diff --git a/contracts/src/v0.8/ccip/applications/CCIPClientExample.sol b/contracts/src/v0.8/ccip/applications/CCIPClientExample.sol deleted file mode 100644 index b105cf8b00..0000000000 --- a/contracts/src/v0.8/ccip/applications/CCIPClientExample.sol +++ /dev/null @@ -1,173 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; - -import {IRouterClient} from "../interfaces/IRouterClient.sol"; - -import {OwnerIsCreator} from "../../shared/access/OwnerIsCreator.sol"; -import {Client} from "../libraries/Client.sol"; -import {CCIPReceiver} from "./CCIPReceiver.sol"; - -import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; - -// @notice Example of a client which supports EVM/non-EVM chains -// @dev If chain specific logic is required for different chain families (e.g. particular -// decoding the bytes sender for authorization checks), it may be required to point to a helper -// authorization contract unless all chain families are known up front. -// @dev If contract does not implement IAny2EVMMessageReceiver and IERC165, -// and tokens are sent to it, ccipReceive will not be called but tokens will be transferred. -// @dev If the client is upgradeable you have significantly more flexibility and -// can avoid storage based options like the below contract uses. However it's -// worth carefully considering how the trust assumptions of your client dapp will -// change if you introduce upgradeability. An immutable dapp building on top of CCIP -// like the example below will inherit the trust properties of CCIP (i.e. the oracle network). -// @dev The receiver's are encoded offchain and passed as direct arguments to permit supporting -// new chain family receivers (e.g. a Solana encoded receiver address) without upgrading. -contract CCIPClientExample is CCIPReceiver, OwnerIsCreator { - error InvalidChain(uint64 chainSelector); - - event MessageSent(bytes32 messageId); - event MessageReceived(bytes32 messageId); - - // Current feeToken - IERC20 public s_feeToken; - // Below is a simplistic example (same params for all messages) of using storage to allow for new options without - // upgrading the dapp. Note that extra args are chain family specific (e.g. gasLimit is EVM specific etc.). - // and will always be backwards compatible i.e. upgrades are opt-in. - // Offchain we can compute the V1 extraArgs: - // Client.EVMExtraArgsV1 memory extraArgs = Client.EVMExtraArgsV1({gasLimit: 300_000}); - // bytes memory encodedV1ExtraArgs = Client._argsToBytes(extraArgs); - // Then later compute V2 extraArgs, for example if a refund feature was added: - // Client.EVMExtraArgsV2 memory extraArgs = Client.EVMExtraArgsV2({gasLimit: 300_000, destRefundAddress: 0x1234}); - // bytes memory encodedV2ExtraArgs = Client._argsToBytes(extraArgs); - // and update storage with the new args. - // If different options are required for different messages, for example different gas limits, - // one can simply key based on (chainSelector, messageType) instead of only chainSelector. - mapping(uint64 destChainSelector => bytes extraArgsBytes) public s_chains; - - constructor(IRouterClient router, IERC20 feeToken) CCIPReceiver(address(router)) { - s_feeToken = feeToken; - s_feeToken.approve(address(router), type(uint256).max); - } - - function enableChain(uint64 chainSelector, bytes memory extraArgs) external onlyOwner { - s_chains[chainSelector] = extraArgs; - } - - function disableChain(uint64 chainSelector) external onlyOwner { - delete s_chains[chainSelector]; - } - - function ccipReceive(Client.Any2EVMMessage calldata message) - external - virtual - override - onlyRouter - validChain(message.sourceChainSelector) - { - // Extremely important to ensure only router calls this. - // Tokens in message if any will be transferred to this contract - // TODO: Validate sender/origin chain and process message and/or tokens. - _ccipReceive(message); - } - - function _ccipReceive(Client.Any2EVMMessage memory message) internal override { - emit MessageReceived(message.messageId); - } - - /// @notice sends data to receiver on dest chain. Assumes address(this) has sufficient native asset. - function sendDataPayNative( - uint64 destChainSelector, - bytes memory receiver, - bytes memory data - ) external validChain(destChainSelector) { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](0); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: receiver, - data: data, - tokenAmounts: tokenAmounts, - extraArgs: s_chains[destChainSelector], - feeToken: address(0) // We leave the feeToken empty indicating we'll pay raw native. - }); - bytes32 messageId = IRouterClient(i_ccipRouter).ccipSend{ - value: IRouterClient(i_ccipRouter).getFee(destChainSelector, message) - }(destChainSelector, message); - emit MessageSent(messageId); - } - - /// @notice sends data to receiver on dest chain. Assumes address(this) has sufficient feeToken. - function sendDataPayFeeToken( - uint64 destChainSelector, - bytes memory receiver, - bytes memory data - ) external validChain(destChainSelector) { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](0); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: receiver, - data: data, - tokenAmounts: tokenAmounts, - extraArgs: s_chains[destChainSelector], - feeToken: address(s_feeToken) - }); - // Optional uint256 fee = i_ccipRouter.getFee(destChainSelector, message); - // Can decide if fee is acceptable. - // address(this) must have sufficient feeToken or the send will revert. - bytes32 messageId = IRouterClient(i_ccipRouter).ccipSend(destChainSelector, message); - emit MessageSent(messageId); - } - - /// @notice sends data to receiver on dest chain. Assumes address(this) has sufficient native token. - function sendDataAndTokens( - uint64 destChainSelector, - bytes memory receiver, - bytes memory data, - Client.EVMTokenAmount[] memory tokenAmounts - ) external validChain(destChainSelector) { - for (uint256 i = 0; i < tokenAmounts.length; ++i) { - IERC20(tokenAmounts[i].token).transferFrom(msg.sender, address(this), tokenAmounts[i].amount); - IERC20(tokenAmounts[i].token).approve(i_ccipRouter, tokenAmounts[i].amount); - } - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: receiver, - data: data, - tokenAmounts: tokenAmounts, - extraArgs: s_chains[destChainSelector], - feeToken: address(s_feeToken) - }); - // Optional uint256 fee = i_ccipRouter.getFee(destChainSelector, message); - // Can decide if fee is acceptable. - // address(this) must have sufficient feeToken or the send will revert. - bytes32 messageId = IRouterClient(i_ccipRouter).ccipSend(destChainSelector, message); - emit MessageSent(messageId); - } - - // @notice user sends tokens to a receiver - // Approvals can be optimized with a whitelist of tokens and inf approvals if desired. - function sendTokens( - uint64 destChainSelector, - bytes memory receiver, - Client.EVMTokenAmount[] memory tokenAmounts - ) external validChain(destChainSelector) { - for (uint256 i = 0; i < tokenAmounts.length; ++i) { - IERC20(tokenAmounts[i].token).transferFrom(msg.sender, address(this), tokenAmounts[i].amount); - IERC20(tokenAmounts[i].token).approve(i_ccipRouter, tokenAmounts[i].amount); - } - bytes memory data; - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: receiver, - data: data, - tokenAmounts: tokenAmounts, - extraArgs: s_chains[destChainSelector], - feeToken: address(s_feeToken) - }); - // Optional uint256 fee = i_ccipRouter.getFee(destChainSelector, message); - // Can decide if fee is acceptable. - // address(this) must have sufficient feeToken or the send will revert. - bytes32 messageId = IRouterClient(i_ccipRouter).ccipSend(destChainSelector, message); - emit MessageSent(messageId); - } - - modifier validChain(uint64 chainSelector) { - if (s_chains[chainSelector].length == 0) revert InvalidChain(chainSelector); - _; - } -} diff --git a/contracts/src/v0.8/ccip/applications/DefensiveExample.sol b/contracts/src/v0.8/ccip/applications/DefensiveExample.sol deleted file mode 100644 index 54e1e80946..0000000000 --- a/contracts/src/v0.8/ccip/applications/DefensiveExample.sol +++ /dev/null @@ -1,117 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; - -import {IRouterClient} from "../interfaces/IRouterClient.sol"; - -import {Client} from "../libraries/Client.sol"; -import {CCIPClientExample} from "./CCIPClientExample.sol"; - -import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; -import {SafeERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; -import {EnumerableMap} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableMap.sol"; - -contract DefensiveExample is CCIPClientExample { - using EnumerableMap for EnumerableMap.Bytes32ToUintMap; - using SafeERC20 for IERC20; - - error OnlySelf(); - error ErrorCase(); - error MessageNotFailed(bytes32 messageId); - - event MessageFailed(bytes32 indexed messageId, bytes reason); - event MessageSucceeded(bytes32 indexed messageId); - event MessageRecovered(bytes32 indexed messageId); - - // Example error code, could have many different error codes. - enum ErrorCode { - // RESOLVED is first so that the default value is resolved. - RESOLVED, - // Could have any number of error codes here. - BASIC - } - - // The message contents of failed messages are stored here. - mapping(bytes32 messageId => Client.Any2EVMMessage contents) public s_messageContents; - - // Contains failed messages and their state. - EnumerableMap.Bytes32ToUintMap internal s_failedMessages; - - // This is used to simulate a revert in the processMessage function. - bool internal s_simRevert = false; - - constructor(IRouterClient router, IERC20 feeToken) CCIPClientExample(router, feeToken) {} - - /// @notice The entrypoint for the CCIP router to call. This function should - /// never revert, all errors should be handled internally in this contract. - /// @param message The message to process. - /// @dev Extremely important to ensure only router calls this. - function ccipReceive(Client.Any2EVMMessage calldata message) - external - override - onlyRouter - validChain(message.sourceChainSelector) - { - try this.processMessage(message) {} - catch (bytes memory err) { - // Could set different error codes based on the caught error. Each could be - // handled differently. - s_failedMessages.set(message.messageId, uint256(ErrorCode.BASIC)); - s_messageContents[message.messageId] = message; - // Don't revert so CCIP doesn't revert. Emit event instead. - // The message can be retried later without having to do manual execution of CCIP. - emit MessageFailed(message.messageId, err); - return; - } - emit MessageSucceeded(message.messageId); - } - - /// @notice This function the entrypoint for this contract to process messages. - /// @param message The message to process. - /// @dev This example just sends the tokens to the owner of this contracts. More - /// interesting functions could be implemented. - /// @dev It has to be external because of the try/catch. - function processMessage(Client.Any2EVMMessage calldata message) - external - onlySelf - validChain(message.sourceChainSelector) - { - // Simulate a revert - if (s_simRevert) revert ErrorCase(); - - // Send tokens to the owner - for (uint256 i = 0; i < message.destTokenAmounts.length; ++i) { - IERC20(message.destTokenAmounts[i].token).safeTransfer(owner(), message.destTokenAmounts[i].amount); - } - // Do other things that might revert - } - - /// @notice This function is callable by the owner when a message has failed - /// to unblock the tokens that are associated with that message. - /// @dev This function is only callable by the owner. - function retryFailedMessage(bytes32 messageId, address tokenReceiver) external onlyOwner { - if (s_failedMessages.get(messageId) != uint256(ErrorCode.BASIC)) revert MessageNotFailed(messageId); - // Set the error code to 0 to disallow reentry and retry the same failed message - // multiple times. - s_failedMessages.set(messageId, uint256(ErrorCode.RESOLVED)); - - // Do stuff to retry message, potentially just releasing the associated tokens - Client.Any2EVMMessage memory message = s_messageContents[messageId]; - - // send the tokens to the receiver as escape hatch - for (uint256 i = 0; i < message.destTokenAmounts.length; ++i) { - IERC20(message.destTokenAmounts[i].token).safeTransfer(tokenReceiver, message.destTokenAmounts[i].amount); - } - - emit MessageRecovered(messageId); - } - - // An example function to demonstrate recovery - function setSimRevert(bool simRevert) external onlyOwner { - s_simRevert = simRevert; - } - - modifier onlySelf() { - if (msg.sender != address(this)) revert OnlySelf(); - _; - } -} diff --git a/contracts/src/v0.8/ccip/applications/EtherSenderReceiver.sol b/contracts/src/v0.8/ccip/applications/EtherSenderReceiver.sol deleted file mode 100644 index ce8ed1ff7a..0000000000 --- a/contracts/src/v0.8/ccip/applications/EtherSenderReceiver.sol +++ /dev/null @@ -1,180 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {ITypeAndVersion} from "../../shared/interfaces/ITypeAndVersion.sol"; - -import {IRouterClient} from "../interfaces/IRouterClient.sol"; -import {IWrappedNative} from "../interfaces/IWrappedNative.sol"; - -import {Client} from "./../libraries/Client.sol"; -import {CCIPReceiver} from "./CCIPReceiver.sol"; - -import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; -import {SafeERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; - -//solhint-disable interface-starts-with-i -interface CCIPRouter { - function getWrappedNative() external view returns (address); -} - -/// @notice A contract that can send raw ether cross-chain using CCIP. -/// Since CCIP only supports ERC-20 token transfers, this contract accepts -/// normal ether, wraps it, and uses CCIP to send it cross-chain. -/// On the receiving side, the wrapped ether is unwrapped and sent to the final receiver. -/// @notice This contract only supports chains where the wrapped native contract -/// is the WETH contract (i.e not WMATIC, or WAVAX, etc.). This is because the -/// receiving contract will always unwrap the ether using it's local wrapped native contract. -/// @dev This contract is both a sender and a receiver. This same contract can be -/// deployed on source and destination chains to facilitate cross-chain ether transfers -/// and act as a sender and a receiver. -/// @dev This contract is intentionally ownerless and permissionless. This contract -/// will never hold any excess funds, native or otherwise, when used correctly. -contract EtherSenderReceiver is CCIPReceiver, ITypeAndVersion { - using SafeERC20 for IERC20; - - error InvalidTokenAmounts(uint256 gotAmounts); - error InvalidToken(address gotToken, address expectedToken); - error TokenAmountNotEqualToMsgValue(uint256 gotAmount, uint256 msgValue); - - string public constant override typeAndVersion = "EtherSenderReceiver 1.5.0"; - - /// @notice The wrapped native token address. - /// @dev If the wrapped native token address changes on the router, this contract will need to be redeployed. - IWrappedNative public immutable i_weth; - - /// @param router The CCIP router address. - constructor(address router) CCIPReceiver(router) { - i_weth = IWrappedNative(CCIPRouter(router).getWrappedNative()); - i_weth.approve(router, type(uint256).max); - } - - /// @notice Need this in order to unwrap correctly. - receive() external payable {} - - /// @notice Get the fee for sending a message to a destination chain. - /// This is mirrored from the router for convenience, construct the appropriate - /// message and get it's fee. - /// @param destinationChainSelector The destination chainSelector - /// @param message The cross-chain CCIP message including data and/or tokens - /// @return fee returns execution fee for the message - /// delivery to destination chain, denominated in the feeToken specified in the message. - /// @dev Reverts with appropriate reason upon invalid message. - function getFee( - uint64 destinationChainSelector, - Client.EVM2AnyMessage calldata message - ) external view returns (uint256 fee) { - Client.EVM2AnyMessage memory validatedMessage = _validatedMessage(message); - - return IRouterClient(getRouter()).getFee(destinationChainSelector, validatedMessage); - } - - /// @notice Send raw native tokens cross-chain. - /// @param destinationChainSelector The destination chain selector. - /// @param message The CCIP message with the following fields correctly set: - /// - bytes receiver: The _contract_ address on the destination chain that will receive the wrapped ether. - /// The caller must ensure that this contract address is correct, otherwise funds may be lost forever. - /// - address feeToken: The fee token address. Must be address(0) for native tokens, or a supported CCIP fee token otherwise (i.e, LINK token). - /// In the event a feeToken is set, we will transferFrom the caller the fee amount before sending the message, in order to forward them to the router. - /// - EVMTokenAmount[] tokenAmounts: The tokenAmounts array must contain a single element with the following fields: - /// - uint256 amount: The amount of ether to send. - /// There are a couple of cases here that depend on the fee token specified: - /// 1. If feeToken == address(0), the fee must be included in msg.value. Therefore tokenAmounts[0].amount must be less than msg.value, - /// and the difference will be used as the fee. - /// 2. If feeToken != address(0), the fee is not included in msg.value, and tokenAmounts[0].amount must be equal to msg.value. - /// these fees to the CCIP router. - /// @return messageId The CCIP message ID. - function ccipSend( - uint64 destinationChainSelector, - Client.EVM2AnyMessage calldata message - ) external payable returns (bytes32) { - _validateFeeToken(message); - Client.EVM2AnyMessage memory validatedMessage = _validatedMessage(message); - - i_weth.deposit{value: validatedMessage.tokenAmounts[0].amount}(); - - uint256 fee = IRouterClient(getRouter()).getFee(destinationChainSelector, validatedMessage); - if (validatedMessage.feeToken != address(0)) { - // If the fee token is not native, we need to transfer the fee to this contract and re-approve it to the router. - // Its not possible to have any leftover tokens in this path because we transferFrom the exact fee that CCIP - // requires from the caller. - IERC20(validatedMessage.feeToken).safeTransferFrom(msg.sender, address(this), fee); - - // We gave an infinite approval of weth to the router in the constructor. - if (validatedMessage.feeToken != address(i_weth)) { - IERC20(validatedMessage.feeToken).approve(getRouter(), fee); - } - - return IRouterClient(getRouter()).ccipSend(destinationChainSelector, validatedMessage); - } - - // We don't want to keep any excess ether in this contract, so we send over the entire address(this).balance as the fee. - // CCIP will revert if the fee is insufficient, so we don't need to check here. - return IRouterClient(getRouter()).ccipSend{value: address(this).balance}(destinationChainSelector, validatedMessage); - } - - /// @notice Validate the message content. - /// @dev Only allows a single token to be sent. Always overwritten to be address(i_weth) - /// and receiver is always msg.sender. - function _validatedMessage(Client.EVM2AnyMessage calldata message) - internal - view - returns (Client.EVM2AnyMessage memory) - { - Client.EVM2AnyMessage memory validatedMessage = message; - - if (validatedMessage.tokenAmounts.length != 1) { - revert InvalidTokenAmounts(validatedMessage.tokenAmounts.length); - } - - validatedMessage.data = abi.encode(msg.sender); - validatedMessage.tokenAmounts[0].token = address(i_weth); - - return validatedMessage; - } - - function _validateFeeToken(Client.EVM2AnyMessage calldata message) internal view { - uint256 tokenAmount = message.tokenAmounts[0].amount; - - if (message.feeToken != address(0)) { - // If the fee token is NOT native, then the token amount must be equal to msg.value. - // This is done to ensure that there is no leftover ether in this contract. - if (msg.value != tokenAmount) { - revert TokenAmountNotEqualToMsgValue(tokenAmount, msg.value); - } - } - } - - /// @notice Receive the wrapped ether, unwrap it, and send it to the specified EOA in the data field. - /// @param message The CCIP message containing the wrapped ether amount and the final receiver. - /// @dev The code below should never revert if the message being is valid according - /// to the above _validatedMessage and _validateFeeToken functions. - function _ccipReceive(Client.Any2EVMMessage memory message) internal override { - address receiver = abi.decode(message.data, (address)); - - if (message.destTokenAmounts.length != 1) { - revert InvalidTokenAmounts(message.destTokenAmounts.length); - } - - if (message.destTokenAmounts[0].token != address(i_weth)) { - revert InvalidToken(message.destTokenAmounts[0].token, address(i_weth)); - } - - uint256 tokenAmount = message.destTokenAmounts[0].amount; - i_weth.withdraw(tokenAmount); - - // it is possible that the below call may fail if receiver.code.length > 0 and the contract - // doesn't e.g have a receive() or a fallback() function. - (bool success,) = payable(receiver).call{value: tokenAmount}(""); - if (!success) { - // We have a few options here: - // 1. Revert: this is bad generally because it may mean that these tokens are stuck. - // 2. Store the tokens in a mapping and allow the user to withdraw them with another tx. - // 3. Send WETH to the receiver address. - // We opt for (3) here because at least the receiver will have the funds and can unwrap them if needed. - // However it is worth noting that if receiver is actually a contract AND the contract _cannot_ withdraw - // the WETH, then the WETH will be stuck in this contract. - i_weth.deposit{value: tokenAmount}(); - i_weth.transfer(receiver, tokenAmount); - } - } -} diff --git a/contracts/src/v0.8/ccip/applications/PingPongDemo.sol b/contracts/src/v0.8/ccip/applications/PingPongDemo.sol deleted file mode 100644 index 423fdc4546..0000000000 --- a/contracts/src/v0.8/ccip/applications/PingPongDemo.sol +++ /dev/null @@ -1,102 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; - -import {ITypeAndVersion} from "../../shared/interfaces/ITypeAndVersion.sol"; -import {IRouterClient} from "../interfaces/IRouterClient.sol"; - -import {OwnerIsCreator} from "../../shared/access/OwnerIsCreator.sol"; -import {Client} from "../libraries/Client.sol"; -import {CCIPReceiver} from "./CCIPReceiver.sol"; - -import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; - -/// @title PingPongDemo - A simple ping-pong contract for demonstrating cross-chain communication -contract PingPongDemo is CCIPReceiver, OwnerIsCreator, ITypeAndVersion { - event Ping(uint256 pingPongCount); - event Pong(uint256 pingPongCount); - - // The chain ID of the counterpart ping pong contract - uint64 internal s_counterpartChainSelector; - // The contract address of the counterpart ping pong contract - address internal s_counterpartAddress; - // Pause ping-ponging - bool private s_isPaused; - // The fee token used to pay for CCIP transactions - IERC20 internal s_feeToken; - - constructor(address router, IERC20 feeToken) CCIPReceiver(router) { - s_isPaused = false; - s_feeToken = feeToken; - s_feeToken.approve(address(router), type(uint256).max); - } - - function typeAndVersion() external pure virtual returns (string memory) { - return "PingPongDemo 1.2.0"; - } - - function setCounterpart(uint64 counterpartChainSelector, address counterpartAddress) external onlyOwner { - s_counterpartChainSelector = counterpartChainSelector; - s_counterpartAddress = counterpartAddress; - } - - function startPingPong() external onlyOwner { - s_isPaused = false; - _respond(1); - } - - function _respond(uint256 pingPongCount) internal virtual { - if (pingPongCount & 1 == 1) { - emit Ping(pingPongCount); - } else { - emit Pong(pingPongCount); - } - bytes memory data = abi.encode(pingPongCount); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(s_counterpartAddress), - data: data, - tokenAmounts: new Client.EVMTokenAmount[](0), - extraArgs: "", - feeToken: address(s_feeToken) - }); - IRouterClient(getRouter()).ccipSend(s_counterpartChainSelector, message); - } - - function _ccipReceive(Client.Any2EVMMessage memory message) internal override { - uint256 pingPongCount = abi.decode(message.data, (uint256)); - if (!s_isPaused) { - _respond(pingPongCount + 1); - } - } - - ///////////////////////////////////////////////////////////////////// - // Plumbing - ///////////////////////////////////////////////////////////////////// - - function getCounterpartChainSelector() external view returns (uint64) { - return s_counterpartChainSelector; - } - - function setCounterpartChainSelector(uint64 chainSelector) external onlyOwner { - s_counterpartChainSelector = chainSelector; - } - - function getCounterpartAddress() external view returns (address) { - return s_counterpartAddress; - } - - function getFeeToken() external view returns (IERC20) { - return s_feeToken; - } - - function setCounterpartAddress(address addr) external onlyOwner { - s_counterpartAddress = addr; - } - - function isPaused() external view returns (bool) { - return s_isPaused; - } - - function setPaused(bool pause) external onlyOwner { - s_isPaused = pause; - } -} diff --git a/contracts/src/v0.8/ccip/applications/external/CCIPClient.sol b/contracts/src/v0.8/ccip/applications/external/CCIPClient.sol new file mode 100644 index 0000000000..7376a3cabf --- /dev/null +++ b/contracts/src/v0.8/ccip/applications/external/CCIPClient.sol @@ -0,0 +1,94 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {IRouterClient} from "../../interfaces/IRouterClient.sol"; + +import {Client} from "../../libraries/Client.sol"; +import {CCIPReceiverWithACK} from "./CCIPReceiverWithACK.sol"; + +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; + +/// @notice CCIPReceiver and CCIPSender cannot be simultaneously imported due to similar parents so CCIPSender functionality has been duplicated +contract CCIPClient is CCIPReceiverWithACK { + using SafeERC20 for IERC20; + + error InvalidConfig(); + error CannotAcknowledgeUnsentMessage(bytes32); + + constructor(address router, IERC20 feeToken) CCIPReceiverWithACK(router, feeToken) {} + + function typeAndVersion() external pure virtual override returns (string memory) { + return "CCIPClient 1.0.0-dev"; + } + + /// @notice sends a message through CCIP to the router + function ccipSend( + uint64 destChainSelector, + Client.EVMTokenAmount[] memory tokenAmounts, + bytes memory data + ) public payable isValidChain(destChainSelector) returns (bytes32 messageId) { + Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ + receiver: s_chainConfigs[destChainSelector].recipient, + data: data, + tokenAmounts: tokenAmounts, + extraArgs: s_chainConfigs[destChainSelector].extraArgsBytes, + feeToken: address(s_feeToken) + }); + + for (uint256 i = 0; i < tokenAmounts.length; ++i) { + // Transfer the tokens to pay for tokens in tokenAmounts + IERC20(tokenAmounts[i].token).safeTransferFrom(msg.sender, address(this), tokenAmounts[i].amount); + + // Do not approve the tokens if it is the feeToken, otherwise the approval amount may overflow + if (tokenAmounts[i].token != address(s_feeToken)) { + IERC20(tokenAmounts[i].token).safeIncreaseAllowance(i_ccipRouter, tokenAmounts[i].amount); + } + } + + uint256 fee = IRouterClient(i_ccipRouter).getFee(destChainSelector, message); + + // Additional tokens for fees do not need to be approved to the router since it is already handled by setting s_feeToken + if (address(s_feeToken) != address(0)) { + IERC20(s_feeToken).safeTransferFrom(msg.sender, address(this), fee); + } + + messageId = IRouterClient(i_ccipRouter).ccipSend{value: address(s_feeToken) == address(0) ? fee : 0}( + destChainSelector, message + ); + + s_messageStatus[messageId] = CCIPReceiverWithACK.MessageStatus.SENT; + + // Since the message was outgoing, and not ACK, reflect this with bytes32(0) + emit MessageSent(messageId, bytes32(0)); + + return messageId; + } + + /// @notice Implementation of arbitrary logic to be executed when a CCIP message is received + /// @dev is only invoked by self on CCIPReceive, and should implement arbitrary dapp-specific logic + function processMessage(Client.Any2EVMMessage calldata message) external virtual override onlySelf { + (MessagePayload memory payload) = abi.decode(message.data, (MessagePayload)); + + if (payload.messageType == MessageType.OUTGOING) { + // Insert Processing workflow here. + + // If the message was outgoing, then send an ack response. + _sendAck(message); + } else if (payload.messageType == MessageType.ACK) { + // Decode message into the message-heacder and the messageId to ensure the message is encoded correctly + (bytes memory messageHeader, bytes32 messageId) = abi.decode(payload.data, (bytes, bytes32)); + + // Ensure Ack Message contains proper message header + if (keccak256(messageHeader) != keccak256(ACK_MESSAGE_HEADER)) revert InvalidAckMessageHeader(); + + // Make sure the ACK message was originally sent by this contract + if (s_messageStatus[messageId] != MessageStatus.SENT) revert CannotAcknowledgeUnsentMessage(messageId); + + // Mark the message has finalized from a proper ack-message. + s_messageStatus[messageId] = MessageStatus.ACKNOWLEDGED; + + emit MessageAckReceived(messageId); + } + } +} diff --git a/contracts/src/v0.8/ccip/applications/external/CCIPClientBase.sol b/contracts/src/v0.8/ccip/applications/external/CCIPClientBase.sol new file mode 100644 index 0000000000..09a532c20e --- /dev/null +++ b/contracts/src/v0.8/ccip/applications/external/CCIPClientBase.sol @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {OwnerIsCreator} from "../../../shared/access/OwnerIsCreator.sol"; +import {ITypeAndVersion} from "../../../shared/interfaces/ITypeAndVersion.sol"; + +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; +import {Address} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/Address.sol"; + +abstract contract CCIPClientBase is OwnerIsCreator, ITypeAndVersion { + using SafeERC20 for IERC20; + using Address for address; + + error ZeroAddressNotAllowed(); + error InvalidRouter(address router); + error InvalidChain(uint64 chainSelector); + error InvalidSender(bytes sender); + error InvalidRecipient(bytes recipient); + + struct ApprovedSenderUpdate { + uint64 destChainSelector; + bytes sender; // The address which initiated source-chain message, abi-encoded in case of a non-EVM-compatible network + } + + struct ChainConfig { + bool disabled; + bytes recipient; // The address to send messages to on the destination-chain, abi.encode(addr) if an EVM-compatible networks + bytes extraArgsBytes; // Includes additional configs such as manual gas limit, and out-of-order-execution. Should not be supplied at runtime to prevent unexpected contract behavior + mapping(bytes recipient => bool isApproved) approvedSender; + } + + address internal immutable i_ccipRouter; + + mapping(uint64 destChainSelector => ChainConfig) public s_chainConfigs; + + constructor(address router) { + if (router == address(0)) revert ZeroAddressNotAllowed(); + i_ccipRouter = router; + } + + // ================================================================ + // │ Router Management │ + // ================================================================ + + /// @notice returns the address of the CCIP Router set at contract-deployment + function getRouter() public view virtual returns (address) { + return i_ccipRouter; + } + + /// @dev only calls from the set router are accepted. + modifier onlyRouter() { + if (msg.sender != getRouter()) revert InvalidRouter(msg.sender); + _; + } + + // ================================================================ + // │ Sender/Receiver Management │ + // ================================================================ + + /// @notice modify the list of approved source-chain contracts which can send messages to this contract through CCIP + /// @dev removes are executed before additions, so a contract present in both will be approved at the end of execution + function updateApprovedSenders( + ApprovedSenderUpdate[] calldata adds, + ApprovedSenderUpdate[] calldata removes + ) external onlyOwner { + for (uint256 i = 0; i < removes.length; ++i) { + delete s_chainConfigs[removes[i].destChainSelector].approvedSender[removes[i].sender]; + } + + for (uint256 i = 0; i < adds.length; ++i) { + s_chainConfigs[adds[i].destChainSelector].approvedSender[adds[i].sender] = true; + } + } + + /// @notice Return whether a contract on the specified source chain is authorized to send messages to this contract through CCIP + /// @param sourceChainSelector A unique CCIP-specific identifier for the source chain + /// @param senderAddr The address which sent the message on the source-chain, abi-encoded if evm-compatible + /// @return bool Whether the address is approved or not to invoke functions on this contract + function isApprovedSender(uint64 sourceChainSelector, bytes calldata senderAddr) external view returns (bool) { + return s_chainConfigs[sourceChainSelector].approvedSender[senderAddr]; + } + + // ================================================================ + // │ Fee Token Management │ + // =============================================================== + + /// @notice function support native-fee-token pre-funding in all children implementing the ccipSend function + receive() external payable {} + + /// @notice Allow the owner to recover any native-tokens sent to this contract out of error. + /// @dev Function should not be used to recover tokens from failed-messages, abandonFailedMessage() should be used instead + /// @param to A payable address to send the recovered tokens to + /// @param amount the amount of native tokens to recover, denominated in wei + function withdrawNativeToken(address payable to, uint256 amount) external onlyOwner { + Address.sendValue(to, amount); + } + + /// @notice Allow the owner to recover any ERC-20 tokens sent to this contract out of error. + /// @dev Function should not be used to recover tokens from failed-messages, abandonFailedMessage() should be used instead + /// @param to A payable address to send the recovered tokens to + /// @param amount the amount of native tokens to recover, denominated in wei function withdrawTokens(address token, address to, uint256 amount) external onlyOwner { + function withdrawTokens(address token, address to, uint256 amount) external onlyOwner { + IERC20(token).safeTransfer(to, amount); + } + + // ================================================================ + // │ Chain Management │ + // ================================================================ + + /// @notice Enable a remote-chain to send and receive messages to/from this contract via CCIP + /// @param chainSelector A unique CCIP-specific identifier for the source chain + /// @param recipient The address a message should be sent to on the destination chain. There should only be one per-chain, and is abi-encoded if EVM-compatible. + /// @param _extraArgsBytes additional optional ccipSend parameters. Do not need to be set unless necessary based on the application-logic + function enableChain( + uint64 chainSelector, + bytes calldata recipient, + bytes calldata _extraArgsBytes + ) external onlyOwner { + ChainConfig storage currentConfig = s_chainConfigs[chainSelector]; + + currentConfig.recipient = recipient; + + // Set any additional args such as enabling out-of-order execution or manual gas-limit + if (_extraArgsBytes.length != 0) currentConfig.extraArgsBytes = _extraArgsBytes; + + // If config was previously disabled, then re-enable it; + if (currentConfig.disabled) currentConfig.disabled = false; + } + + /// @notice Mark a chain as not supported for sending-receiving messages to/from this contract via CCIP. + /// @dev If a chain needs to be re-enabled after being disabled, the owner must call enableChain() to support it again. + function disableChain(uint64 chainSelector) external onlyOwner { + s_chainConfigs[chainSelector].disabled = true; + } + + modifier isValidChain(uint64 chainSelector) { + // Must be storage and not memory because the struct contains a nested mapping which is not capable of being copied to memory + ChainConfig storage currentConfig = s_chainConfigs[chainSelector]; + if (currentConfig.recipient.length == 0 || currentConfig.disabled) revert InvalidChain(chainSelector); + _; + } + + modifier isValidSender(uint64 chainSelector, bytes memory sender) { + if (!s_chainConfigs[chainSelector].approvedSender[sender]) revert InvalidSender(sender); + _; + } +} diff --git a/contracts/src/v0.8/ccip/applications/external/CCIPReceiver.sol b/contracts/src/v0.8/ccip/applications/external/CCIPReceiver.sol new file mode 100644 index 0000000000..b6dc6fc8b0 --- /dev/null +++ b/contracts/src/v0.8/ccip/applications/external/CCIPReceiver.sol @@ -0,0 +1,150 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {Client} from "../../libraries/Client.sol"; +import {CCIPClientBase} from "./CCIPClientBase.sol"; + +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; +import {EnumerableMap} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableMap.sol"; + +contract CCIPReceiver is CCIPClientBase { + using SafeERC20 for IERC20; + using EnumerableMap for EnumerableMap.Bytes32ToUintMap; + + error OnlySelf(); + error MessageNotFailed(bytes32 messageId); + + event MessageFailed(bytes32 indexed messageId, bytes reason); + event MessageSucceeded(bytes32 indexed messageId); + event MessageRecovered(bytes32 indexed messageId); + event MessageAbandoned(bytes32 indexed messageId, address tokenReceiver); + + // Example error code, could have many different error codes. + enum ErrorCode { + // RESOLVED is first so that the default value is resolved. + RESOLVED, + FAILED, + ABANDONED + } + + // The message contents of failed messages are stored here. + mapping(bytes32 messageId => Client.Any2EVMMessage contents) internal s_messageContents; + + // Contains failed messages and their state. + EnumerableMap.Bytes32ToUintMap internal s_failedMessages; + + constructor(address router) CCIPClientBase(router) {} + + function typeAndVersion() external pure virtual returns (string memory) { + return "CCIPReceiver 1.0.0-dev"; + } + + // ================================================================ + // │ Incoming Message Processing | + // ================================================================ + + /// @notice The entrypoint for the CCIP router to call. This function should + /// never revert, all errors should be handled internally in this contract. + /// @param message The message to process. + /// @dev Extremely important to ensure only router calls this. + function ccipReceive(Client.Any2EVMMessage calldata message) + external + virtual + onlyRouter + isValidChain(message.sourceChainSelector) + { + try this.processMessage(message) {} + catch (bytes memory err) { + // Mark the message as having failed. Any failures should be tracked by individual Dapps, since CCIP + // will mark the message as having been successfully delivered. CCIP makes no assurances about message delivery + // other than invocation with proper gas limit. Any logic/execution errors should be tracked by separately. + s_failedMessages.set(message.messageId, uint256(ErrorCode.FAILED)); + + // Store the message contents in case it needs to be retried or abandoned + s_messageContents[message.messageId] = message; + + // Don't revert because CCIPRouter doesn't revert. Emit event instead. + // The message can be retried or abandoned later without having to do manual execution of CCIP, which should + // be reserved for retrying with a higher gas limit. + emit MessageFailed(message.messageId, err); + return; + } + + emit MessageSucceeded(message.messageId); + } + + /// @notice Contains arbitrary application-logic for incoming CCIP messages. + /// @dev It has to be external because of the try/catch of ccipReceive() which invokes it + function processMessage(Client.Any2EVMMessage calldata message) + external + virtual + onlySelf + isValidSender(message.sourceChainSelector, message.sender) + {} + + // ================================================================ + // │ Failed Message Processing | + // ================== ============================================== + + /// @notice Execute a message that failed initial delivery, but with different logic specifically for re-execution. + /// @dev Since the function invoked _retryFailedMessage(), which is marked onlyOwner, this may only be called by the Owner as well. + /// @dev function will revert if the messageId was not already stored as having failed its initial execution + /// @param messageId the unique ID of the CCIP-message which failed initial-execution. + function retryFailedMessage(bytes32 messageId) external { + if (s_failedMessages.get(messageId) != uint256(ErrorCode.FAILED)) revert MessageNotFailed(messageId); + + // Set the error code to 0 to disallow reentry and retry the same failed message + // multiple times. + s_failedMessages.set(messageId, uint256(ErrorCode.RESOLVED)); + + // Allow developer to implement arbitrary functionality on retried messages, such as just releasing the associated tokens + Client.Any2EVMMessage memory message = s_messageContents[messageId]; + + // Allow the user override the implementation, since different workflow may be desired for retrying a merssage + _retryFailedMessage(message); + + emit MessageRecovered(messageId); + } + + /// @notice A function that should contain any special logic needed to "retry" processing of a previously failed message. + /// @dev if the owner wants to retrieve tokens without special logic, then abandonMessage() or recoverTokens() should be used instead + /// @dev function is marked onlyOwner, but is virtual. Allowing permissionless execution is not recommended but may be allowed if function is overridden + function _retryFailedMessage(Client.Any2EVMMessage memory message) internal virtual onlyOwner {} + + /// @notice Should be used to recover tokens from a failed message, while ensuring the message cannot be retried + /// @notice function will send tokens to destination, but will NOT invoke any arbitrary logic afterwards. + /// @dev this function is only callable as the owner, and + function abandonFailedMessage(bytes32 messageId, address receiver) external onlyOwner { + if (s_failedMessages.get(messageId) != uint256(ErrorCode.FAILED)) revert MessageNotFailed(messageId); + + s_failedMessages.set(messageId, uint256(ErrorCode.ABANDONED)); + Client.Any2EVMMessage memory message = s_messageContents[messageId]; + + for (uint256 i = 0; i < message.destTokenAmounts.length; ++i) { + IERC20(message.destTokenAmounts[i].token).safeTransfer(receiver, message.destTokenAmounts[i].amount); + } + + emit MessageAbandoned(messageId, receiver); + } + + // ================================================================ + // │ Message Tracking │ + // ================================================================ + + /// @param messageId the ID of the message delivered by the CCIP Router + /// @return Any2EVMMessage a standard CCIP message for EVM-compatible networks + function getMessageContents(bytes32 messageId) public view returns (Client.Any2EVMMessage memory) { + return s_messageContents[messageId]; + } + + /// @param messageId the ID of the message delivered by the CCIP Router + function getMessageStatus(bytes32 messageId) public view returns (uint256) { + return s_failedMessages.get(messageId); + } + + modifier onlySelf() { + if (msg.sender != address(this)) revert OnlySelf(); + _; + } +} diff --git a/contracts/src/v0.8/ccip/applications/external/CCIPReceiverWithACK.sol b/contracts/src/v0.8/ccip/applications/external/CCIPReceiverWithACK.sol new file mode 100644 index 0000000000..aee2b4686d --- /dev/null +++ b/contracts/src/v0.8/ccip/applications/external/CCIPReceiverWithACK.sol @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {IRouterClient} from "../../interfaces/IRouterClient.sol"; +import {Client} from "../../libraries/Client.sol"; +import {CCIPReceiver} from "./CCIPReceiver.sol"; + +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; + +import {EnumerableMap} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableMap.sol"; + +contract CCIPReceiverWithACK is CCIPReceiver { + using SafeERC20 for IERC20; + using EnumerableMap for EnumerableMap.Bytes32ToUintMap; + + error InvalidAckMessageHeader(); + error MessageAlreadyAcknowledged(bytes32 messageId); + + event MessageAckSent(bytes32 incomingMessageId); + event MessageSent(bytes32 indexed incomingMessageId, bytes32 indexed ACKMessageId); + event MessageAckReceived(bytes32); + event FeeTokenModified(address indexed oldToken, address indexed newToken); + + enum MessageType { + OUTGOING, + ACK + } + + enum MessageStatus { + QUIET, + SENT, + ACKNOWLEDGED + } + + struct MessagePayload { + bytes version; + bytes data; + MessageType messageType; + } + + bytes public constant ACK_MESSAGE_HEADER = "MESSAGE_ACKNOWLEDGED_"; + + // Current feeToken + IERC20 public s_feeToken; + + mapping(bytes32 messageId => MessageStatus status) public s_messageStatus; + + constructor(address router, IERC20 feeToken) CCIPReceiver(router) { + s_feeToken = feeToken; + + // If fee token is in LINK, then approve router to transfer + if (address(feeToken) != address(0)) { + feeToken.safeIncreaseAllowance(router, type(uint256).max); + } + } + + function typeAndVersion() external pure virtual override returns (string memory) { + return "CCIPReceiverWithACK 1.0.0-dev"; + } + + function modifyFeeToken(address token) external onlyOwner { + // If the current fee token is not-native, zero out the allowance to the router for safety + if (address(s_feeToken) != address(0)) { + s_feeToken.safeApprove(getRouter(), 0); + } + + address oldFeeToken = address(s_feeToken); + s_feeToken = IERC20(token); + + // Approve the router to spend the new fee token + if (token != address(0)) { + s_feeToken.safeIncreaseAllowance(getRouter(), type(uint256).max); + } + + emit FeeTokenModified(oldFeeToken, token); + } + + /// @notice The entrypoint for the CCIP router to call. This function should never revert, all errors should be handled internally in this contract. + /// @param message The message to process. + /// @dev Extremely important to ensure only router calls this. + function ccipReceive(Client.Any2EVMMessage calldata message) + public + override + onlyRouter + isValidSender(message.sourceChainSelector, message.sender) + isValidChain(message.sourceChainSelector) + { + try this.processMessage(message) {} + catch (bytes memory err) { + s_failedMessages.set(message.messageId, uint256(ErrorCode.FAILED)); + s_messageContents[message.messageId] = message; + + // Don't revert so CCIPRouter doesn't revert. Emit event instead. + // The message can be retried later without having to do manual execution of CCIP. + emit MessageFailed(message.messageId, err); + return; + } + + emit MessageSucceeded(message.messageId); + } + + /// @notice Application-specific logic for incoming ccip-messages. + /// @dev Function does NOT require the status of an incoming ACK be "sent" because this implementation does not send, only receives + /// @dev Any MessageType encoding is implemented by the sender-contract, and is not natively part of CCIP-messages. + function processMessage(Client.Any2EVMMessage calldata message) external virtual override onlySelf { + (MessagePayload memory payload) = abi.decode(message.data, (MessagePayload)); + + if (payload.messageType == MessageType.OUTGOING) { + // Insert Processing workflow here. + + // If the message was outgoing on the source-chain, then send an ack response. + _sendAck(message); + } else if (payload.messageType == MessageType.ACK) { + // Decode message into the message header and the messageId to ensure the message is encoded correctly + (bytes memory messageHeader, bytes32 messageId) = abi.decode(payload.data, (bytes, bytes32)); + + // Ensure Ack Message contains proper message header + if (keccak256(messageHeader) != keccak256(ACK_MESSAGE_HEADER)) revert InvalidAckMessageHeader(); + + // Make sure the ACK message has not already been acknowledged + if (s_messageStatus[messageId] == MessageStatus.ACKNOWLEDGED) revert MessageAlreadyAcknowledged(messageId); + + // Mark the message has finalized from a proper ack-message. + s_messageStatus[messageId] = MessageStatus.ACKNOWLEDGED; + + emit MessageAckReceived(messageId); + } + } + + /// @notice Sends the acknowledgement message back through CCIP to original sender contract + function _sendAck(Client.Any2EVMMessage calldata incomingMessage) internal { + Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](0); + + // Build the outgoing ACK message, with no tokens, with data being the concatenation of the acknowledgement header and incoming-messageId + Client.EVM2AnyMessage memory outgoingMessage = Client.EVM2AnyMessage({ + receiver: incomingMessage.sender, + data: abi.encode(ACK_MESSAGE_HEADER, incomingMessage.messageId), + tokenAmounts: tokenAmounts, + extraArgs: s_chainConfigs[incomingMessage.sourceChainSelector].extraArgsBytes, + feeToken: address(s_feeToken) + }); + + uint256 feeAmount = IRouterClient(i_ccipRouter).getFee(incomingMessage.sourceChainSelector, outgoingMessage); + + bytes32 ACKmessageId = IRouterClient(i_ccipRouter).ccipSend{ + value: address(s_feeToken) == address(0) ? feeAmount : 0 + }(incomingMessage.sourceChainSelector, outgoingMessage); + + emit MessageSent(incomingMessage.messageId, ACKmessageId); + } +} diff --git a/contracts/src/v0.8/ccip/applications/external/CCIPSender.sol b/contracts/src/v0.8/ccip/applications/external/CCIPSender.sol new file mode 100644 index 0000000000..88f7d20ff9 --- /dev/null +++ b/contracts/src/v0.8/ccip/applications/external/CCIPSender.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {IRouterClient} from "../../interfaces/IRouterClient.sol"; + +import {Client} from "../../libraries/Client.sol"; +import {CCIPClientBase} from "./CCIPClientBase.sol"; + +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; + +/// @notice Example of a client which supports EVM/non-EVM chains +/// @dev If chain specific logic is required for different chain families (e.g. particular +/// decoding the bytes sender for authorization checks), it may be required to point to a helper +/// authorization contract unless all chain families are known up front. +/// @dev If contract does not implement IAny2EVMMessageReceiver and IERC165, +/// and tokens are sent to it, ccipReceive will not be called but tokens will be transferred. +/// @dev If the client is upgradeable you have significantly more flexibility and +/// can avoid storage based options like the below contract uses. However it's +/// worth carefully considering how the trust assumptions of your client dapp will +/// change if you introduce upgradeability. An immutable dapp building on top of CCIP +/// like the example below will inherit the trust properties of CCIP (i.e. the oracle network). +/// @dev The receiver's are encoded offchain and passed as direct arguments to permit supporting +/// new chain family receivers (e.g. a solana encoded receiver address) without upgrading. +contract CCIPSender is CCIPClientBase { + using SafeERC20 for IERC20; + + error InvalidConfig(); + error InsufficientNativeFeeTokenAmount(); + + event MessageSent(bytes32 messageId); + event MessageReceived(bytes32 messageId); + + constructor(address router) CCIPClientBase(router) {} + + function typeAndVersion() external pure virtual override returns (string memory) { + return "CCIPSender 1.0.0-dev"; + } + + /// @notice sends a message through CCIP to the router + function ccipSend( + uint64 destChainSelector, + Client.EVMTokenAmount[] calldata tokenAmounts, + bytes calldata data, + address feeToken + ) public payable isValidChain(destChainSelector) returns (bytes32 messageId) { + Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ + receiver: s_chainConfigs[destChainSelector].recipient, + data: data, + tokenAmounts: tokenAmounts, + feeToken: feeToken, + extraArgs: s_chainConfigs[destChainSelector].extraArgsBytes + }); + + for (uint256 i = 0; i < tokenAmounts.length; ++i) { + // Transfer the tokens to this contract to pay the router for the tokens in tokenAmounts + IERC20(tokenAmounts[i].token).safeTransferFrom(msg.sender, address(this), tokenAmounts[i].amount); + IERC20(tokenAmounts[i].token).safeIncreaseAllowance(i_ccipRouter, tokenAmounts[i].amount); + } + + uint256 fee = IRouterClient(i_ccipRouter).getFee(destChainSelector, message); + + if (feeToken != address(0)) { + IERC20(feeToken).safeTransferFrom(msg.sender, address(this), fee); + IERC20(feeToken).safeIncreaseAllowance(i_ccipRouter, fee); + } + + messageId = + IRouterClient(i_ccipRouter).ccipSend{value: feeToken == address(0) ? fee : 0}(destChainSelector, message); + + emit MessageSent(messageId); + + return messageId; + } +} diff --git a/contracts/src/v0.8/ccip/applications/internal/PingPongDemo.sol b/contracts/src/v0.8/ccip/applications/internal/PingPongDemo.sol new file mode 100644 index 0000000000..64669c3819 --- /dev/null +++ b/contracts/src/v0.8/ccip/applications/internal/PingPongDemo.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {Client} from "../../libraries/Client.sol"; +import {CCIPClient} from "../external/CCIPClient.sol"; + +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; + +/// @title PingPongDemo - A simple ping-pong contract for demonstrating cross-chain communication +contract PingPongDemo is CCIPClient { + using SafeERC20 for IERC20; + + event Ping(uint256 pingPongCount); + event Pong(uint256 pingPongCount); + + // The chain ID of the counterpart ping pong contract + uint64 internal s_counterpartChainSelector; + + // The contract address of the counterpart ping pong contract + address internal s_counterpartAddress; + + // Pause ping-ponging + bool private s_isPaused; + + // CCIPClient will handle the token approval so there's no need to do it here + constructor(address router, IERC20 feeToken) CCIPClient(router, feeToken) {} + + function typeAndVersion() external pure virtual override returns (string memory) { + return "PingPongDemo 1.3.0"; + } + + function startPingPong() external onlyOwner { + s_isPaused = false; + + // Start the game + _respond(1); + } + + function _respond(uint256 pingPongCount) internal virtual { + if (pingPongCount & 1 == 1) { + emit Ping(pingPongCount); + } else { + emit Pong(pingPongCount); + } + + bytes memory data = abi.encode(pingPongCount); + + ccipSend({ + destChainSelector: s_counterpartChainSelector, // destChaio + tokenAmounts: new Client.EVMTokenAmount[](0), + data: data + }); + } + + /// @notice This function the entrypoint for this contract to process messages. + /// @param message The message to process. + /// @dev This example just sends the tokens to the owner of this contracts. More + /// interesting functions could be implemented. + /// @dev It has to be external because of the try/catch. + function processMessage(Client.Any2EVMMessage calldata message) + external + override + onlySelf + isValidSender(message.sourceChainSelector, message.sender) + isValidChain(message.sourceChainSelector) + { + uint256 pingPongCount = abi.decode(message.data, (uint256)); + if (!s_isPaused) { + _respond(pingPongCount + 1); + } + } + + // ================================================================ + // │ Admin Functions │ + // ================================================================ + + function setCounterpart(uint64 counterpartChainSelector, address counterpartAddress) external onlyOwner { + s_counterpartChainSelector = counterpartChainSelector; + s_counterpartAddress = counterpartAddress; + + // Approve the counterpart contract under validSender + // s_approvedSenders[counterpartChainSelector][abi.encode(counterpartAddress)] = true; + s_chainConfigs[counterpartChainSelector].approvedSender[abi.encode(counterpartAddress)] = true; + + // Approve the counterpart Chain selector under validChain + s_chainConfigs[counterpartChainSelector].recipient = abi.encode(counterpartAddress); + } + + function setCounterpartChainSelector(uint64 counterpartChainSelector) external onlyOwner { + s_counterpartChainSelector = counterpartChainSelector; + } + + function setCounterpartAddress(address counterpartAddress) external onlyOwner { + s_counterpartAddress = counterpartAddress; + + s_chainConfigs[s_counterpartChainSelector].recipient = abi.encode(counterpartAddress); + } + + function setPaused(bool pause) external onlyOwner { + s_isPaused = pause; + } + + // ================================================================ + // │ State Management │ + // ================================================================ + + function getCounterpartChainSelector() external view returns (uint64) { + return s_counterpartChainSelector; + } + + function getCounterpartAddress() external view returns (address) { + return s_counterpartAddress; + } + + function isPaused() external view returns (bool) { + return s_isPaused; + } +} diff --git a/contracts/src/v0.8/ccip/applications/SelfFundedPingPong.sol b/contracts/src/v0.8/ccip/applications/internal/SelfFundedPingPong.sol similarity index 90% rename from contracts/src/v0.8/ccip/applications/SelfFundedPingPong.sol rename to contracts/src/v0.8/ccip/applications/internal/SelfFundedPingPong.sol index 80bc7bb24a..888e5aa361 100644 --- a/contracts/src/v0.8/ccip/applications/SelfFundedPingPong.sol +++ b/contracts/src/v0.8/ccip/applications/internal/SelfFundedPingPong.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {Router} from "../Router.sol"; -import {Client} from "../libraries/Client.sol"; -import {EVM2EVMOnRamp} from "../onRamp/EVM2EVMOnRamp.sol"; +import {Router} from "../../Router.sol"; +import {Client} from "../../libraries/Client.sol"; +import {EVM2EVMOnRamp} from "../../onRamp/EVM2EVMOnRamp.sol"; import {PingPongDemo} from "./PingPongDemo.sol"; -import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; contract SelfFundedPingPong is PingPongDemo { string public constant override typeAndVersion = "SelfFundedPingPong 1.2.0"; diff --git a/contracts/src/v0.8/ccip/applications/TokenProxy.sol b/contracts/src/v0.8/ccip/applications/internal/TokenProxy.sol similarity index 88% rename from contracts/src/v0.8/ccip/applications/TokenProxy.sol rename to contracts/src/v0.8/ccip/applications/internal/TokenProxy.sol index 6fd26c076b..df0c3ffdc3 100644 --- a/contracts/src/v0.8/ccip/applications/TokenProxy.sol +++ b/contracts/src/v0.8/ccip/applications/internal/TokenProxy.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import {IRouterClient} from "../interfaces/IRouterClient.sol"; +import {IRouterClient} from "../../interfaces/IRouterClient.sol"; -import {OwnerIsCreator} from "../../shared/access/OwnerIsCreator.sol"; -import {Client} from "../libraries/Client.sol"; +import {OwnerIsCreator} from "../../../shared/access/OwnerIsCreator.sol"; +import {Client} from "../../libraries/Client.sol"; -import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; -import {SafeERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; contract TokenProxy is OwnerIsCreator { using SafeERC20 for IERC20; diff --git a/contracts/src/v0.8/ccip/test/applications/DefensiveExample.t.sol b/contracts/src/v0.8/ccip/test/applications/DefensiveExample.t.sol deleted file mode 100644 index 18453f9f52..0000000000 --- a/contracts/src/v0.8/ccip/test/applications/DefensiveExample.t.sol +++ /dev/null @@ -1,97 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; - -import {DefensiveExample} from "../../applications/DefensiveExample.sol"; -import {Client} from "../../libraries/Client.sol"; -import {EVM2EVMOnRampSetup} from "../onRamp/EVM2EVMOnRampSetup.t.sol"; - -import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; - -contract DefensiveExampleTest is EVM2EVMOnRampSetup { - event MessageFailed(bytes32 indexed messageId, bytes reason); - event MessageSucceeded(bytes32 indexed messageId); - event MessageRecovered(bytes32 indexed messageId); - - DefensiveExample internal s_receiver; - uint64 internal sourceChainSelector = 7331; - - function setUp() public virtual override { - EVM2EVMOnRampSetup.setUp(); - - s_receiver = new DefensiveExample(s_destRouter, IERC20(s_destFeeToken)); - s_receiver.enableChain(sourceChainSelector, abi.encode("")); - } - - function test_Recovery() public { - bytes32 messageId = keccak256("messageId"); - address token = address(s_destFeeToken); - uint256 amount = 111333333777; - Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); - destTokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); - - // Make sure we give the receiver contract enough tokens like CCIP would. - deal(token, address(s_receiver), amount); - - // Make sure the contract call reverts so we can test recovery. - s_receiver.setSimRevert(true); - - // The receiver contract will revert if the router is not the sender. - vm.startPrank(address(s_destRouter)); - - vm.expectEmit(); - emit MessageFailed(messageId, abi.encodeWithSelector(DefensiveExample.ErrorCase.selector)); - - s_receiver.ccipReceive( - Client.Any2EVMMessage({ - messageId: messageId, - sourceChainSelector: sourceChainSelector, - sender: abi.encode(address(0)), // wrong sender, will revert internally - data: "", - destTokenAmounts: destTokenAmounts - }) - ); - - address tokenReceiver = address(0x000001337); - uint256 tokenReceiverBalancePre = IERC20(token).balanceOf(tokenReceiver); - uint256 receiverBalancePre = IERC20(token).balanceOf(address(s_receiver)); - - // Recovery can only be done by the owner. - vm.startPrank(OWNER); - - vm.expectEmit(); - emit MessageRecovered(messageId); - - s_receiver.retryFailedMessage(messageId, tokenReceiver); - - // Assert the tokens have successfully been rescued from the contract. - assertEq(IERC20(token).balanceOf(tokenReceiver), tokenReceiverBalancePre + amount); - assertEq(IERC20(token).balanceOf(address(s_receiver)), receiverBalancePre - amount); - } - - function test_HappyPath_Success() public { - bytes32 messageId = keccak256("messageId"); - address token = address(s_destFeeToken); - uint256 amount = 111333333777; - Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); - destTokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); - - // Make sure we give the receiver contract enough tokens like CCIP would. - deal(token, address(s_receiver), amount); - - // The receiver contract will revert if the router is not the sender. - vm.startPrank(address(s_destRouter)); - - vm.expectEmit(); - emit MessageSucceeded(messageId); - - s_receiver.ccipReceive( - Client.Any2EVMMessage({ - messageId: messageId, - sourceChainSelector: sourceChainSelector, - sender: abi.encode(address(s_receiver)), // correct sender - data: "", - destTokenAmounts: destTokenAmounts - }) - ); - } -} diff --git a/contracts/src/v0.8/ccip/test/applications/EtherSenderReceiver.t.sol b/contracts/src/v0.8/ccip/test/applications/EtherSenderReceiver.t.sol deleted file mode 100644 index cfd402d910..0000000000 --- a/contracts/src/v0.8/ccip/test/applications/EtherSenderReceiver.t.sol +++ /dev/null @@ -1,718 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; - -import {Test} from "forge-std/Test.sol"; - -import {CCIPRouter} from "../../applications/EtherSenderReceiver.sol"; - -import {IRouterClient} from "../../interfaces/IRouterClient.sol"; -import {Client} from "../../libraries/Client.sol"; -import {WETH9} from "../WETH9.sol"; -import {EtherSenderReceiverHelper} from "./../helpers/EtherSenderReceiverHelper.sol"; - -import {ERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/ERC20.sol"; - -contract EtherSenderReceiverTest is Test { - EtherSenderReceiverHelper internal s_etherSenderReceiver; - WETH9 internal s_weth; - WETH9 internal s_someOtherWeth; - ERC20 internal s_linkToken; - - address internal constant OWNER = 0x00007e64E1fB0C487F25dd6D3601ff6aF8d32e4e; - address internal constant ROUTER = 0x0F3779ee3a832D10158073ae2F5e61ac7FBBF880; - address internal constant XCHAIN_RECEIVER = 0xBd91b2073218AF872BF73b65e2e5950ea356d147; - - function setUp() public { - vm.startPrank(OWNER); - - s_linkToken = new ERC20("Chainlink Token", "LINK"); - s_someOtherWeth = new WETH9(); - s_weth = new WETH9(); - vm.mockCall(ROUTER, abi.encodeWithSelector(CCIPRouter.getWrappedNative.selector), abi.encode(address(s_weth))); - s_etherSenderReceiver = new EtherSenderReceiverHelper(ROUTER); - - deal(OWNER, 1_000_000 ether); - deal(address(s_linkToken), OWNER, 1_000_000 ether); - - // deposit some eth into the weth contract. - s_weth.deposit{value: 10 ether}(); - uint256 wethSupply = s_weth.totalSupply(); - assertEq(wethSupply, 10 ether, "total weth supply must be 10 ether"); - } -} - -contract EtherSenderReceiverTest_constructor is EtherSenderReceiverTest { - function test_constructor() public view { - assertEq(s_etherSenderReceiver.getRouter(), ROUTER, "router must be set correctly"); - uint256 allowance = s_weth.allowance(address(s_etherSenderReceiver), ROUTER); - assertEq(allowance, type(uint256).max, "allowance must be set infinite"); - } -} - -contract EtherSenderReceiverTest_validateFeeToken is EtherSenderReceiverTest { - uint256 internal constant amount = 100; - - error InsufficientMsgValue(uint256 gotAmount, uint256 msgValue); - error TokenAmountNotEqualToMsgValue(uint256 gotAmount, uint256 msgValue); - - function test_validateFeeToken_valid_native() public { - Client.EVMTokenAmount[] memory tokenAmount = new Client.EVMTokenAmount[](1); - tokenAmount[0] = Client.EVMTokenAmount({token: address(s_weth), amount: amount}); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmount, - feeToken: address(0), - extraArgs: "" - }); - - s_etherSenderReceiver.validateFeeToken{value: amount + 1}(message); - } - - function test_validateFeeToken_valid_feeToken() public { - Client.EVMTokenAmount[] memory tokenAmount = new Client.EVMTokenAmount[](1); - tokenAmount[0] = Client.EVMTokenAmount({token: address(s_weth), amount: amount}); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmount, - feeToken: address(s_weth), - extraArgs: "" - }); - - s_etherSenderReceiver.validateFeeToken{value: amount}(message); - } - - function test_validateFeeToken_reverts_feeToken_tokenAmountNotEqualToMsgValue() public { - Client.EVMTokenAmount[] memory tokenAmount = new Client.EVMTokenAmount[](1); - tokenAmount[0] = Client.EVMTokenAmount({token: address(s_weth), amount: amount}); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmount, - feeToken: address(s_weth), - extraArgs: "" - }); - - vm.expectRevert(abi.encodeWithSelector(TokenAmountNotEqualToMsgValue.selector, amount, amount + 1)); - s_etherSenderReceiver.validateFeeToken{value: amount + 1}(message); - } -} - -contract EtherSenderReceiverTest_validatedMessage is EtherSenderReceiverTest { - error InvalidDestinationReceiver(bytes destReceiver); - error InvalidTokenAmounts(uint256 gotAmounts); - error InvalidWethAddress(address want, address got); - error GasLimitTooLow(uint256 minLimit, uint256 gotLimit); - - uint256 internal constant amount = 100; - - function test_Fuzz_validatedMessage_msgSenderOverwrite(bytes memory data) public view { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: data, - tokenAmounts: tokenAmounts, - feeToken: address(0), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - assertEq(validatedMessage.receiver, abi.encode(XCHAIN_RECEIVER), "receiver must be XCHAIN_RECEIVER"); - assertEq(validatedMessage.data, abi.encode(OWNER), "data must be msg.sender"); - assertEq(validatedMessage.tokenAmounts[0].token, address(s_weth), "token must be weth"); - assertEq(validatedMessage.tokenAmounts[0].amount, amount, "amount must be correct"); - assertEq(validatedMessage.feeToken, address(0), "feeToken must be 0"); - assertEq(validatedMessage.extraArgs, bytes(""), "extraArgs must be empty"); - } - - function test_Fuzz_validatedMessage_tokenAddressOverwrite(address token) public view { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(0), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - assertEq(validatedMessage.receiver, abi.encode(XCHAIN_RECEIVER), "receiver must be XCHAIN_RECEIVER"); - assertEq(validatedMessage.data, abi.encode(OWNER), "data must be msg.sender"); - assertEq(validatedMessage.tokenAmounts[0].token, address(s_weth), "token must be weth"); - assertEq(validatedMessage.tokenAmounts[0].amount, amount, "amount must be correct"); - assertEq(validatedMessage.feeToken, address(0), "feeToken must be 0"); - assertEq(validatedMessage.extraArgs, bytes(""), "extraArgs must be empty"); - } - - function test_validatedMessage_emptyDataOverwrittenToMsgSender() public view { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(0), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - assertEq(validatedMessage.receiver, abi.encode(XCHAIN_RECEIVER), "receiver must be XCHAIN_RECEIVER"); - assertEq(validatedMessage.data, abi.encode(OWNER), "data must be msg.sender"); - assertEq(validatedMessage.tokenAmounts[0].token, address(s_weth), "token must be weth"); - assertEq(validatedMessage.tokenAmounts[0].amount, amount, "amount must be correct"); - assertEq(validatedMessage.feeToken, address(0), "feeToken must be 0"); - assertEq(validatedMessage.extraArgs, bytes(""), "extraArgs must be empty"); - } - - function test_validatedMessage_dataOverwrittenToMsgSender() public view { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: abi.encode(address(42)), - tokenAmounts: tokenAmounts, - feeToken: address(0), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - assertEq(validatedMessage.receiver, abi.encode(XCHAIN_RECEIVER), "receiver must be XCHAIN_RECEIVER"); - assertEq(validatedMessage.data, abi.encode(OWNER), "data must be msg.sender"); - assertEq(validatedMessage.tokenAmounts[0].token, address(s_weth), "token must be weth"); - assertEq(validatedMessage.tokenAmounts[0].amount, amount, "amount must be correct"); - assertEq(validatedMessage.feeToken, address(0), "feeToken must be 0"); - assertEq(validatedMessage.extraArgs, bytes(""), "extraArgs must be empty"); - } - - function test_validatedMessage_tokenOverwrittenToWeth() public view { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(42), // incorrect token. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(0), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - assertEq(validatedMessage.receiver, abi.encode(XCHAIN_RECEIVER), "receiver must be XCHAIN_RECEIVER"); - assertEq(validatedMessage.data, abi.encode(OWNER), "data must be msg.sender"); - assertEq(validatedMessage.tokenAmounts[0].token, address(s_weth), "token must be weth"); - assertEq(validatedMessage.tokenAmounts[0].amount, amount, "amount must be correct"); - assertEq(validatedMessage.feeToken, address(0), "feeToken must be 0"); - assertEq(validatedMessage.extraArgs, bytes(""), "extraArgs must be empty"); - } - - function test_validatedMessage_validMessage_extraArgs() public view { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(0), - extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: 200_000})) - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - assertEq(validatedMessage.receiver, abi.encode(XCHAIN_RECEIVER), "receiver must be XCHAIN_RECEIVER"); - assertEq(validatedMessage.data, abi.encode(OWNER), "data must be msg.sender"); - assertEq(validatedMessage.tokenAmounts[0].token, address(s_weth), "token must be weth"); - assertEq(validatedMessage.tokenAmounts[0].amount, amount, "amount must be correct"); - assertEq(validatedMessage.feeToken, address(0), "feeToken must be 0"); - assertEq( - validatedMessage.extraArgs, - Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: 200_000})), - "extraArgs must be correct" - ); - } - - function test_validatedMessage_invalidTokenAmounts() public { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](2); - tokenAmounts[0] = Client.EVMTokenAmount({token: address(0), amount: amount}); - tokenAmounts[1] = Client.EVMTokenAmount({token: address(0), amount: amount}); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(0), - extraArgs: "" - }); - - vm.expectRevert(abi.encodeWithSelector(InvalidTokenAmounts.selector, uint256(2))); - s_etherSenderReceiver.validatedMessage(message); - } -} - -contract EtherSenderReceiverTest_getFee is EtherSenderReceiverTest { - uint64 internal constant destinationChainSelector = 424242; - uint256 internal constant feeWei = 121212; - uint256 internal constant amount = 100; - - function test_getFee() public { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({token: address(0), amount: amount}); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(0), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.getFee.selector, destinationChainSelector, validatedMessage), - abi.encode(feeWei) - ); - - uint256 fee = s_etherSenderReceiver.getFee(destinationChainSelector, message); - assertEq(fee, feeWei, "fee must be feeWei"); - } -} - -contract EtherSenderReceiverTest_ccipReceive is EtherSenderReceiverTest { - uint256 internal constant amount = 100; - uint64 internal constant sourceChainSelector = 424242; - address internal constant XCHAIN_SENDER = 0x9951529C13B01E542f7eE3b6D6665D292e9BA2E0; - - error InvalidTokenAmounts(uint256 gotAmounts); - error InvalidToken(address gotToken, address expectedToken); - - function test_Fuzz_ccipReceive(uint256 tokenAmount) public { - // cap to 10 ether because OWNER only has 10 ether. - if (tokenAmount > 10 ether) { - return; - } - - Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); - destTokenAmounts[0] = Client.EVMTokenAmount({token: address(s_weth), amount: tokenAmount}); - Client.Any2EVMMessage memory message = Client.Any2EVMMessage({ - messageId: keccak256(abi.encode("ccip send")), - sourceChainSelector: sourceChainSelector, - sender: abi.encode(XCHAIN_SENDER), - data: abi.encode(OWNER), - destTokenAmounts: destTokenAmounts - }); - - // simulate a cross-chain token transfer, just transfer the weth to s_etherSenderReceiver. - s_weth.transfer(address(s_etherSenderReceiver), tokenAmount); - - uint256 balanceBefore = OWNER.balance; - s_etherSenderReceiver.publicCcipReceive(message); - uint256 balanceAfter = OWNER.balance; - assertEq(balanceAfter, balanceBefore + tokenAmount, "balance must be correct"); - } - - function test_ccipReceive_happyPath() public { - Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); - destTokenAmounts[0] = Client.EVMTokenAmount({token: address(s_weth), amount: amount}); - Client.Any2EVMMessage memory message = Client.Any2EVMMessage({ - messageId: keccak256(abi.encode("ccip send")), - sourceChainSelector: 424242, - sender: abi.encode(XCHAIN_SENDER), - data: abi.encode(OWNER), - destTokenAmounts: destTokenAmounts - }); - - // simulate a cross-chain token transfer, just transfer the weth to s_etherSenderReceiver. - s_weth.transfer(address(s_etherSenderReceiver), amount); - - uint256 balanceBefore = OWNER.balance; - s_etherSenderReceiver.publicCcipReceive(message); - uint256 balanceAfter = OWNER.balance; - assertEq(balanceAfter, balanceBefore + amount, "balance must be correct"); - } - - function test_ccipReceive_fallbackToWethTransfer() public { - Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); - destTokenAmounts[0] = Client.EVMTokenAmount({token: address(s_weth), amount: amount}); - Client.Any2EVMMessage memory message = Client.Any2EVMMessage({ - messageId: keccak256(abi.encode("ccip send")), - sourceChainSelector: 424242, - sender: abi.encode(XCHAIN_SENDER), - data: abi.encode(address(s_linkToken)), // ERC20 cannot receive() ether. - destTokenAmounts: destTokenAmounts - }); - - // simulate a cross-chain token transfer, just transfer the weth to s_etherSenderReceiver. - s_weth.transfer(address(s_etherSenderReceiver), amount); - - uint256 balanceBefore = address(s_linkToken).balance; - s_etherSenderReceiver.publicCcipReceive(message); - uint256 balanceAfter = address(s_linkToken).balance; - assertEq(balanceAfter, balanceBefore, "balance must be unchanged"); - uint256 wethBalance = s_weth.balanceOf(address(s_linkToken)); - assertEq(wethBalance, amount, "weth balance must be correct"); - } - - function test_ccipReceive_wrongTokenAmount() public { - Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](2); - destTokenAmounts[0] = Client.EVMTokenAmount({token: address(s_weth), amount: amount}); - destTokenAmounts[1] = Client.EVMTokenAmount({token: address(s_weth), amount: amount}); - Client.Any2EVMMessage memory message = Client.Any2EVMMessage({ - messageId: keccak256(abi.encode("ccip send")), - sourceChainSelector: 424242, - sender: abi.encode(XCHAIN_SENDER), - data: abi.encode(OWNER), - destTokenAmounts: destTokenAmounts - }); - - vm.expectRevert(abi.encodeWithSelector(InvalidTokenAmounts.selector, uint256(2))); - s_etherSenderReceiver.publicCcipReceive(message); - } - - function test_ccipReceive_wrongToken() public { - Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); - destTokenAmounts[0] = Client.EVMTokenAmount({token: address(s_someOtherWeth), amount: amount}); - Client.Any2EVMMessage memory message = Client.Any2EVMMessage({ - messageId: keccak256(abi.encode("ccip send")), - sourceChainSelector: 424242, - sender: abi.encode(XCHAIN_SENDER), - data: abi.encode(OWNER), - destTokenAmounts: destTokenAmounts - }); - - vm.expectRevert(abi.encodeWithSelector(InvalidToken.selector, address(s_someOtherWeth), address(s_weth))); - s_etherSenderReceiver.publicCcipReceive(message); - } -} - -contract EtherSenderReceiverTest_ccipSend is EtherSenderReceiverTest { - error InsufficientFee(uint256 gotFee, uint256 fee); - - uint256 internal constant amount = 100; - uint64 internal constant destinationChainSelector = 424242; - uint256 internal constant feeWei = 121212; - uint256 internal constant feeJuels = 232323; - - function test_Fuzz_ccipSend(uint256 feeFromRouter, uint256 feeSupplied) public { - // cap the fuzzer because OWNER only has a million ether. - vm.assume(feeSupplied < 1_000_000 ether - amount); - - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(0), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.getFee.selector, destinationChainSelector, validatedMessage), - abi.encode(feeFromRouter) - ); - - if (feeSupplied < feeFromRouter) { - vm.expectRevert(); - s_etherSenderReceiver.ccipSend{value: amount + feeSupplied}(destinationChainSelector, message); - } else { - bytes32 expectedMsgId = keccak256(abi.encode("ccip send")); - vm.mockCall( - ROUTER, - feeSupplied, - abi.encodeWithSelector(IRouterClient.ccipSend.selector, destinationChainSelector, validatedMessage), - abi.encode(expectedMsgId) - ); - - bytes32 actualMsgId = - s_etherSenderReceiver.ccipSend{value: amount + feeSupplied}(destinationChainSelector, message); - assertEq(actualMsgId, expectedMsgId, "message id must be correct"); - } - } - - function test_Fuzz_ccipSend_feeToken(uint256 feeFromRouter, uint256 feeSupplied) public { - // cap the fuzzer because OWNER only has a million LINK. - vm.assume(feeSupplied < 1_000_000 ether - amount); - - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(s_linkToken), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.getFee.selector, destinationChainSelector, validatedMessage), - abi.encode(feeFromRouter) - ); - - s_linkToken.approve(address(s_etherSenderReceiver), feeSupplied); - - if (feeSupplied < feeFromRouter) { - vm.expectRevert(); - s_etherSenderReceiver.ccipSend{value: amount}(destinationChainSelector, message); - } else { - bytes32 expectedMsgId = keccak256(abi.encode("ccip send")); - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.ccipSend.selector, destinationChainSelector, validatedMessage), - abi.encode(expectedMsgId) - ); - - bytes32 actualMsgId = s_etherSenderReceiver.ccipSend{value: amount}(destinationChainSelector, message); - assertEq(actualMsgId, expectedMsgId, "message id must be correct"); - } - } - - function test_ccipSend_reverts_insufficientFee_weth() public { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(s_weth), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.getFee.selector, destinationChainSelector, validatedMessage), - abi.encode(feeWei) - ); - - s_weth.approve(address(s_etherSenderReceiver), feeWei - 1); - - vm.expectRevert("SafeERC20: low-level call failed"); - s_etherSenderReceiver.ccipSend{value: amount}(destinationChainSelector, message); - } - - function test_ccipSend_reverts_insufficientFee_feeToken() public { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(s_linkToken), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.getFee.selector, destinationChainSelector, validatedMessage), - abi.encode(feeJuels) - ); - - s_linkToken.approve(address(s_etherSenderReceiver), feeJuels - 1); - - vm.expectRevert("ERC20: insufficient allowance"); - s_etherSenderReceiver.ccipSend{value: amount}(destinationChainSelector, message); - } - - function test_ccipSend_reverts_insufficientFee_native() public { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(0), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.getFee.selector, destinationChainSelector, validatedMessage), - abi.encode(feeWei) - ); - - vm.expectRevert(); - s_etherSenderReceiver.ccipSend{value: amount + feeWei - 1}(destinationChainSelector, message); - } - - function test_ccipSend_success_nativeExcess() public { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(0), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - - bytes32 expectedMsgId = keccak256(abi.encode("ccip send")); - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.getFee.selector, destinationChainSelector, validatedMessage), - abi.encode(feeWei) - ); - - // we assert that the correct value is sent to the router call, which should be - // the msg.value - feeWei. - vm.mockCall( - ROUTER, - feeWei + 1, - abi.encodeWithSelector(IRouterClient.ccipSend.selector, destinationChainSelector, validatedMessage), - abi.encode(expectedMsgId) - ); - - bytes32 actualMsgId = s_etherSenderReceiver.ccipSend{value: amount + feeWei + 1}(destinationChainSelector, message); - assertEq(actualMsgId, expectedMsgId, "message id must be correct"); - } - - function test_ccipSend_success_native() public { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(0), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - - bytes32 expectedMsgId = keccak256(abi.encode("ccip send")); - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.getFee.selector, destinationChainSelector, validatedMessage), - abi.encode(feeWei) - ); - vm.mockCall( - ROUTER, - feeWei, - abi.encodeWithSelector(IRouterClient.ccipSend.selector, destinationChainSelector, validatedMessage), - abi.encode(expectedMsgId) - ); - - bytes32 actualMsgId = s_etherSenderReceiver.ccipSend{value: amount + feeWei}(destinationChainSelector, message); - assertEq(actualMsgId, expectedMsgId, "message id must be correct"); - } - - function test_ccipSend_success_feeToken() public { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(s_linkToken), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - - bytes32 expectedMsgId = keccak256(abi.encode("ccip send")); - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.getFee.selector, destinationChainSelector, validatedMessage), - abi.encode(feeJuels) - ); - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.ccipSend.selector, destinationChainSelector, validatedMessage), - abi.encode(expectedMsgId) - ); - - s_linkToken.approve(address(s_etherSenderReceiver), feeJuels); - - bytes32 actualMsgId = s_etherSenderReceiver.ccipSend{value: amount}(destinationChainSelector, message); - assertEq(actualMsgId, expectedMsgId, "message id must be correct"); - uint256 routerAllowance = s_linkToken.allowance(address(s_etherSenderReceiver), ROUTER); - assertEq(routerAllowance, feeJuels, "router allowance must be feeJuels"); - } - - function test_ccipSend_success_weth() public { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({ - token: address(0), // callers may not specify this. - amount: amount - }); - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(XCHAIN_RECEIVER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: address(s_weth), - extraArgs: "" - }); - - Client.EVM2AnyMessage memory validatedMessage = s_etherSenderReceiver.validatedMessage(message); - - bytes32 expectedMsgId = keccak256(abi.encode("ccip send")); - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.getFee.selector, destinationChainSelector, validatedMessage), - abi.encode(feeWei) - ); - vm.mockCall( - ROUTER, - abi.encodeWithSelector(IRouterClient.ccipSend.selector, destinationChainSelector, validatedMessage), - abi.encode(expectedMsgId) - ); - - s_weth.approve(address(s_etherSenderReceiver), feeWei); - - bytes32 actualMsgId = s_etherSenderReceiver.ccipSend{value: amount}(destinationChainSelector, message); - assertEq(actualMsgId, expectedMsgId, "message id must be correct"); - uint256 routerAllowance = s_weth.allowance(address(s_etherSenderReceiver), ROUTER); - assertEq(routerAllowance, type(uint256).max, "router allowance must be max for weth"); - } -} diff --git a/contracts/src/v0.8/ccip/test/applications/ImmutableExample.t.sol b/contracts/src/v0.8/ccip/test/applications/ImmutableExample.t.sol deleted file mode 100644 index eb12e6205a..0000000000 --- a/contracts/src/v0.8/ccip/test/applications/ImmutableExample.t.sol +++ /dev/null @@ -1,61 +0,0 @@ -pragma solidity ^0.8.0; - -import {IAny2EVMMessageReceiver} from "../../interfaces/IAny2EVMMessageReceiver.sol"; - -import {CCIPClientExample} from "../../applications/CCIPClientExample.sol"; -import {Client} from "../../libraries/Client.sol"; -import {EVM2EVMOnRampSetup} from "../onRamp/EVM2EVMOnRampSetup.t.sol"; - -import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; -import {ERC165Checker} from - "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/ERC165Checker.sol"; - -contract CCIPClientExample_sanity is EVM2EVMOnRampSetup { - function test_ImmutableExamples_Success() public { - CCIPClientExample exampleContract = new CCIPClientExample(s_sourceRouter, IERC20(s_sourceFeeToken)); - deal(address(exampleContract), 100 ether); - deal(s_sourceFeeToken, address(exampleContract), 100 ether); - - // feeToken approval works - assertEq(IERC20(s_sourceFeeToken).allowance(address(exampleContract), address(s_sourceRouter)), 2 ** 256 - 1); - - // Can set chain - Client.EVMExtraArgsV1 memory extraArgs = Client.EVMExtraArgsV1({gasLimit: 300_000}); - bytes memory encodedExtraArgs = Client._argsToBytes(extraArgs); - exampleContract.enableChain(DEST_CHAIN_SELECTOR, encodedExtraArgs); - assertEq(exampleContract.s_chains(DEST_CHAIN_SELECTOR), encodedExtraArgs); - - address toAddress = makeAddr("toAddress"); - - // Can send data pay native - exampleContract.sendDataPayNative(DEST_CHAIN_SELECTOR, abi.encode(toAddress), bytes("hello")); - - // Can send data pay feeToken - exampleContract.sendDataPayFeeToken(DEST_CHAIN_SELECTOR, abi.encode(toAddress), bytes("hello")); - - // Can send data tokens - address sourceToken = s_sourceTokens[1]; - assertEq( - address(s_onRamp.getPoolBySourceToken(DEST_CHAIN_SELECTOR, IERC20(sourceToken))), - address(s_sourcePoolByToken[sourceToken]) - ); - deal(sourceToken, OWNER, 100 ether); - IERC20(sourceToken).approve(address(exampleContract), 1 ether); - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({token: sourceToken, amount: 1 ether}); - exampleContract.sendDataAndTokens(DEST_CHAIN_SELECTOR, abi.encode(toAddress), bytes("hello"), tokenAmounts); - // Tokens transferred from owner to router then burned in pool. - assertEq(IERC20(sourceToken).balanceOf(OWNER), 99 ether); - assertEq(IERC20(sourceToken).balanceOf(address(s_sourceRouter)), 0); - - // Can send just tokens - IERC20(sourceToken).approve(address(exampleContract), 1 ether); - exampleContract.sendTokens(DEST_CHAIN_SELECTOR, abi.encode(toAddress), tokenAmounts); - - // Can receive - assertTrue(ERC165Checker.supportsInterface(address(exampleContract), type(IAny2EVMMessageReceiver).interfaceId)); - - // Can disable chain - exampleContract.disableChain(DEST_CHAIN_SELECTOR); - } -} diff --git a/contracts/src/v0.8/ccip/test/applications/external/CCIPClientTest.t.sol b/contracts/src/v0.8/ccip/test/applications/external/CCIPClientTest.t.sol new file mode 100644 index 0000000000..ae924a8c60 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/applications/external/CCIPClientTest.t.sol @@ -0,0 +1,206 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {CCIPClient} from "../../../applications/external/CCIPClient.sol"; + +import {CCIPReceiverWithACK} from "../../../applications/external/CCIPClient.sol"; +import {CCIPClientBase} from "../../../applications/external/CCIPClientBase.sol"; +import {IRouterClient} from "../../../interfaces/IRouterClient.sol"; + +import {Client} from "../../../libraries/Client.sol"; +import {EVM2EVMOnRampSetup} from "../../onRamp/EVM2EVMOnRampSetup.t.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; + +contract CCIPClientTest is EVM2EVMOnRampSetup { + event MessageFailed(bytes32 indexed messageId, bytes reason); + event MessageSucceeded(bytes32 indexed messageId); + event MessageRecovered(bytes32 indexed messageId); + event MessageSent(bytes32 indexed, bytes32 indexed); + event MessageAckSent(bytes32 incomingMessageId); + event MessageAckReceived(bytes32); + + CCIPClient internal s_sender; + uint64 internal destChainSelector = DEST_CHAIN_SELECTOR; + + function setUp() public virtual override { + EVM2EVMOnRampSetup.setUp(); + + s_sender = new CCIPClient(address(s_sourceRouter), IERC20(s_sourceFeeToken)); + s_sender.enableChain(destChainSelector, abi.encode(address(s_sender)), ""); + + CCIPClientBase.ApprovedSenderUpdate[] memory senderUpdates = new CCIPClientBase.ApprovedSenderUpdate[](1); + senderUpdates[0] = + CCIPClientBase.ApprovedSenderUpdate({destChainSelector: destChainSelector, sender: abi.encode(address(s_sender))}); + + s_sender.updateApprovedSenders(senderUpdates, new CCIPClientBase.ApprovedSenderUpdate[](0)); + } + + function test_ccipReceiveAndSendAck() public { + bytes32 messageId = keccak256("messageId"); + bytes32 ackMessageId = 0x37ddbb21a51d4e07877b0de816905ea806b958e7607d951d307030631db076bd; + address token = address(s_sourceFeeToken); + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](0); + + // Make sure we give the receiver contract enough tokens like CCIP would. + deal(token, address(s_sender), 1e24); + + // The receiver contract will revert if the router is not the sender. + vm.startPrank(address(s_sourceRouter)); + + CCIPReceiverWithACK.MessagePayload memory payload = CCIPReceiverWithACK.MessagePayload({ + version: "", + data: "FAKE_DATA", + messageType: CCIPReceiverWithACK.MessageType.OUTGOING + }); + + Client.EVM2AnyMessage memory ackMessage = Client.EVM2AnyMessage({ + receiver: abi.encode(address(s_sender)), + data: abi.encode(s_sender.ACK_MESSAGE_HEADER(), messageId), + tokenAmounts: destTokenAmounts, + feeToken: s_sourceFeeToken, + extraArgs: "" + }); + + uint256 feeTokenAmount = s_sourceRouter.getFee(destChainSelector, ackMessage); + + uint256 receiverBalanceBefore = IERC20(s_sourceFeeToken).balanceOf(address(s_sender)); + + vm.expectEmit(); + emit MessageSent(messageId, ackMessageId); + + s_sender.ccipReceive( + Client.Any2EVMMessage({ + messageId: messageId, + sourceChainSelector: destChainSelector, + sender: abi.encode(address(s_sender)), + data: abi.encode(payload), + destTokenAmounts: destTokenAmounts + }) + ); + + // Check that fee token is properly subtracted from balance to pay for ack message + assertEq(IERC20(s_sourceFeeToken).balanceOf(address(s_sender)), receiverBalanceBefore - feeTokenAmount); + } + + function test_ccipSend_withNonNativeFeetoken_andNoDestTokens() public { + address token = address(s_sourceFeeToken); + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](0); + + // Make sure we give the receiver contract enough tokens like CCIP would. + IERC20(token).approve(address(s_sender), type(uint256).max); + + Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ + receiver: abi.encode(address(s_sender)), + data: "", + tokenAmounts: destTokenAmounts, + feeToken: s_sourceFeeToken, + extraArgs: "" + }); + + uint256 feeTokenAmount = s_sourceRouter.getFee(DEST_CHAIN_SELECTOR, message); + uint256 feeTokenBalanceBefore = IERC20(s_sourceFeeToken).balanceOf(OWNER); + + s_sender.ccipSend({destChainSelector: DEST_CHAIN_SELECTOR, tokenAmounts: destTokenAmounts, data: ""}); + // feeToken: address(s_sourceFeeToken) + + // Assert that tokens were transfered for bridging + fees + assertEq(IERC20(token).balanceOf(OWNER), feeTokenBalanceBefore - feeTokenAmount); + } + + function test_ccipSendAndReceiveAck_in_return() public { + address token = address(s_sourceFeeToken); + uint256 amount = 111333333777; + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); + destTokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); + + // Make sure we give the receiver contract enough tokens like CCIP would. + IERC20(token).approve(address(s_sender), type(uint256).max); + + bytes32 messageId = + s_sender.ccipSend({destChainSelector: DEST_CHAIN_SELECTOR, tokenAmounts: destTokenAmounts, data: ""}); + // feeToken: address(s_sourceFeeToken) + + // The receiver contract will revert if the router is not the sender. + vm.startPrank(address(s_sourceRouter)); + + CCIPReceiverWithACK.MessagePayload memory payload = CCIPReceiverWithACK.MessagePayload({ + version: "", + data: abi.encode(s_sender.ACK_MESSAGE_HEADER(), messageId), + messageType: CCIPReceiverWithACK.MessageType.ACK + }); + + vm.expectEmit(); + emit MessageAckReceived(messageId); + + s_sender.ccipReceive( + Client.Any2EVMMessage({ + messageId: messageId, + sourceChainSelector: destChainSelector, + sender: abi.encode(address(s_sender)), + data: abi.encode(payload), + destTokenAmounts: destTokenAmounts + }) + ); + + assertEq( + uint256(s_sender.s_messageStatus(messageId)), + uint256(CCIPReceiverWithACK.MessageStatus.ACKNOWLEDGED), + "Ack message was not properly received" + ); + } + + // function test_ccipSend_withNativeFeeToken_butInsufficientMsgValue_REVERT() public { + // Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](0); + + // Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ + // receiver: abi.encode(address(s_sender)), + // data: "FAKE_DATA", + // tokenAmounts: destTokenAmounts, + // feeToken: address(0), + // extraArgs: "" + // }); + + // uint256 feeTokenAmount = s_sourceRouter.getFee(DEST_CHAIN_SELECTOR, message); + + // vm.expectRevert(IRouterClient.InsufficientFeeTokenAmount.selector); + // s_sender.ccipSend{value: feeTokenAmount / 2}({ + // destChainSelector: DEST_CHAIN_SELECTOR, + // tokenAmounts: destTokenAmounts, + // data: "", + // feeToken: address(0) + // }); + // } + + function test_send_tokens_that_are_not_feeToken() public { + address token = s_sourceTokens[1]; + uint256 amount = 111333333777; + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); + destTokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); + + // Make sure we give the receiver contract enough tokens like CCIP would. + + IERC20(token).approve(address(s_sender), type(uint256).max); + IERC20(s_sourceFeeToken).approve(address(s_sender), type(uint256).max); + deal(token, address(this), 1e24); + + Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ + receiver: abi.encode(address(s_sender)), + data: "", + tokenAmounts: destTokenAmounts, + feeToken: s_sourceFeeToken, + extraArgs: "" + }); + + uint256 feeTokenAmount = s_sourceRouter.getFee(DEST_CHAIN_SELECTOR, message); + uint256 tokenBalanceBefore = IERC20(token).balanceOf(OWNER); + uint256 feeTokenBalanceBefore = IERC20(s_sourceFeeToken).balanceOf(OWNER); + + s_sender.ccipSend({destChainSelector: DEST_CHAIN_SELECTOR, tokenAmounts: destTokenAmounts, data: ""}); + // feeToken: address(s_sourceFeeToken) + + // Assert that tokens were transfered for bridging + fees + assertEq(IERC20(token).balanceOf(OWNER), tokenBalanceBefore - amount); + assertEq(IERC20(s_sourceFeeToken).balanceOf(OWNER), feeTokenBalanceBefore - feeTokenAmount); + } +} diff --git a/contracts/src/v0.8/ccip/test/applications/external/CCIPReceiverTest.t.sol b/contracts/src/v0.8/ccip/test/applications/external/CCIPReceiverTest.t.sol new file mode 100644 index 0000000000..e64a5d28ab --- /dev/null +++ b/contracts/src/v0.8/ccip/test/applications/external/CCIPReceiverTest.t.sol @@ -0,0 +1,297 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {CCIPClientBase} from "../../../applications/external/CCIPClientBase.sol"; + +import {CCIPReceiver} from "../../../applications/external/CCIPReceiver.sol"; +import {CCIPReceiverReverting} from "../../helpers/receivers/CCIPReceiverReverting.sol"; + +import {Client} from "../../../libraries/Client.sol"; +import {EVM2EVMOnRampSetup} from "../../onRamp/EVM2EVMOnRampSetup.t.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; + +contract CCIPReceiverTest is EVM2EVMOnRampSetup { + event MessageFailed(bytes32 indexed messageId, bytes reason); + event MessageSucceeded(bytes32 indexed messageId); + event MessageRecovered(bytes32 indexed messageId); + + CCIPReceiverReverting internal s_receiver; + uint64 internal sourceChainSelector = 7331; + + function setUp() public virtual override { + EVM2EVMOnRampSetup.setUp(); + + s_receiver = new CCIPReceiverReverting(address(s_destRouter)); + s_receiver.enableChain(sourceChainSelector, abi.encode(address(1)), ""); + + CCIPClientBase.ApprovedSenderUpdate[] memory senderUpdates = new CCIPClientBase.ApprovedSenderUpdate[](1); + senderUpdates[0] = CCIPClientBase.ApprovedSenderUpdate({ + destChainSelector: sourceChainSelector, + sender: abi.encode(address(s_receiver)) + }); + + s_receiver.updateApprovedSenders(senderUpdates, new CCIPClientBase.ApprovedSenderUpdate[](0)); + } + + function test_Recovery_with_intentional_revert() public { + bytes32 messageId = keccak256("messageId"); + address token = address(s_destFeeToken); + uint256 amount = 111333333777; + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); + destTokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); + + // Make sure we give the receiver contract enough tokens like CCIP would. + deal(token, address(s_receiver), amount); + + // Make sure the contract call reverts so we can test recovery. + s_receiver.setSimRevert(true); + + // The receiver contract will revert if the router is not the sender. + vm.startPrank(address(s_destRouter)); + + vm.expectEmit(); + emit MessageFailed(messageId, abi.encodeWithSelector(CCIPReceiverReverting.ErrorCase.selector)); + + s_receiver.ccipReceive( + Client.Any2EVMMessage({ + messageId: messageId, + sourceChainSelector: sourceChainSelector, + sender: abi.encode(address(s_receiver)), + data: "", + destTokenAmounts: destTokenAmounts + }) + ); + + address tokenReceiver = OWNER; + uint256 tokenReceiverBalancePre = IERC20(token).balanceOf(tokenReceiver); + uint256 receiverBalancePre = IERC20(token).balanceOf(address(s_receiver)); + + // Recovery can only be done by the owner. + vm.startPrank(OWNER); + + vm.expectEmit(); + emit CCIPReceiver.MessageAbandoned(messageId, OWNER); + + s_receiver.abandonFailedMessage(messageId, OWNER); + + // Assert the tokens have successfully been rescued from the contract. + assertEq( + IERC20(token).balanceOf(tokenReceiver), tokenReceiverBalancePre + amount, "tokens not sent to tokenReceiver" + ); + assertEq( + IERC20(token).balanceOf(address(s_receiver)), receiverBalancePre - amount, "tokens not subtracted from receiver" + ); + } + + function test_Recovery_from_invalid_sender() public { + bytes32 messageId = keccak256("messageId"); + address token = address(s_destFeeToken); + uint256 amount = 111333333777; + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); + destTokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); + + // Make sure we give the receiver contract enough tokens like CCIP would. + deal(token, address(s_receiver), amount); + + // The receiver contract will revert if the router is not the sender. + vm.startPrank(address(s_destRouter)); + + vm.expectEmit(); + emit MessageFailed( + messageId, abi.encodeWithSelector(bytes4(CCIPClientBase.InvalidSender.selector), abi.encode(address(1))) + ); + + s_receiver.ccipReceive( + Client.Any2EVMMessage({ + messageId: messageId, + sourceChainSelector: sourceChainSelector, + sender: abi.encode(address(1)), + data: "", + destTokenAmounts: destTokenAmounts + }) + ); + + vm.stopPrank(); + + // Check that the message was stored properly by comparing each of the fields. + // There's no way to check that a function internally will revert from a top-level test, so we need to check state differences + Client.Any2EVMMessage memory failedMessage = s_receiver.getMessageContents(messageId); + assertEq(failedMessage.sender, abi.encode(address(1))); + assertEq(failedMessage.sourceChainSelector, sourceChainSelector); + assertEq(failedMessage.destTokenAmounts[0].token, token); + assertEq(failedMessage.destTokenAmounts[0].amount, amount); + + // Check that message status is failed + assertEq(s_receiver.getMessageStatus(messageId), 1); + + uint256 tokenBalanceBefore = IERC20(token).balanceOf(OWNER); + + vm.startPrank(OWNER); + + vm.expectEmit(); + emit IERC20.Transfer(address(s_receiver), OWNER, amount); + s_receiver.withdrawTokens(token, OWNER, amount); + + assertEq(IERC20(token).balanceOf(OWNER), tokenBalanceBefore + amount); + assertGt(IERC20(token).balanceOf(OWNER), 0); + } + + function test_retryFailedMessage_Success() public { + bytes32 messageId = keccak256("messageId"); + address token = address(s_destFeeToken); + uint256 amount = 111333333777; + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); + destTokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); + + // Make sure we give the receiver contract enough tokens like CCIP would. + deal(token, address(s_receiver), amount); + + // The receiver contract will revert if the router is not the sender. + vm.startPrank(address(s_destRouter)); + + vm.expectEmit(); + emit MessageFailed( + messageId, abi.encodeWithSelector(bytes4(CCIPClientBase.InvalidSender.selector), abi.encode(address(1))) + ); + + s_receiver.ccipReceive( + Client.Any2EVMMessage({ + messageId: messageId, + sourceChainSelector: sourceChainSelector, + sender: abi.encode(address(1)), + data: "", + destTokenAmounts: destTokenAmounts + }) + ); + + vm.stopPrank(); + + // Check that the message was stored properly by comparing each of the fields. + // There's no way to check that a function internally will revert from a top-level test, so we need to check state differences + Client.Any2EVMMessage memory failedMessage = s_receiver.getMessageContents(messageId); + assertEq(failedMessage.sender, abi.encode(address(1))); + assertEq(failedMessage.sourceChainSelector, sourceChainSelector); + assertEq(failedMessage.destTokenAmounts[0].token, token); + assertEq(failedMessage.destTokenAmounts[0].amount, amount); + + // Check that message status is failed + assertEq(s_receiver.getMessageStatus(messageId), 1); + + vm.startPrank(OWNER); + + vm.expectEmit(); + emit CCIPReceiver.MessageRecovered(messageId); + + s_receiver.retryFailedMessage(messageId); + assertEq(s_receiver.getMessageStatus(messageId), 0); + } + + function test_HappyPath_Success() public { + bytes32 messageId = keccak256("messageId"); + address token = address(s_destFeeToken); + uint256 amount = 111333333777; + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); + destTokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); + + // Make sure we give the receiver contract enough tokens like CCIP would. + deal(token, address(s_receiver), amount); + + // The receiver contract will revert if the router is not the sender. + vm.startPrank(address(s_destRouter)); + + vm.expectEmit(); + emit MessageSucceeded(messageId); + + s_receiver.ccipReceive( + Client.Any2EVMMessage({ + messageId: messageId, + sourceChainSelector: sourceChainSelector, + sender: abi.encode(address(s_receiver)), // correct sender + data: "", + destTokenAmounts: destTokenAmounts + }) + ); + } + + function test_disableChain_andRevert_onccipReceive_REVERT() public { + s_receiver.disableChain(sourceChainSelector); + + bytes32 messageId = keccak256("messageId"); + address token = address(s_destFeeToken); + uint256 amount = 111333333777; + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); + destTokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); + + // Make sure we give the receiver contract enough tokens like CCIP would. + deal(token, address(s_receiver), amount); + + // The receiver contract will revert if the router is not the sender. + vm.startPrank(address(s_destRouter)); + + vm.expectRevert(abi.encodeWithSelector(CCIPClientBase.InvalidChain.selector, sourceChainSelector)); + + s_receiver.ccipReceive( + Client.Any2EVMMessage({ + messageId: messageId, + sourceChainSelector: sourceChainSelector, + sender: abi.encode(address(1)), + data: "", + destTokenAmounts: destTokenAmounts + }) + ); + } + + function test_removeSender_from_approvedList_and_revert() public { + CCIPClientBase.ApprovedSenderUpdate[] memory senderUpdates = new CCIPClientBase.ApprovedSenderUpdate[](1); + senderUpdates[0] = CCIPClientBase.ApprovedSenderUpdate({ + destChainSelector: sourceChainSelector, + sender: abi.encode(address(s_receiver)) + }); + + s_receiver.updateApprovedSenders(new CCIPClientBase.ApprovedSenderUpdate[](0), senderUpdates); + + // assertFalse(s_receiver.s_approvedSenders(sourceChainSelector, abi.encode(address(s_receiver)))); + assertFalse(s_receiver.isApprovedSender(sourceChainSelector, abi.encode(address(s_receiver)))); + + bytes32 messageId = keccak256("messageId"); + address token = address(s_destFeeToken); + uint256 amount = 111333333777; + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); + destTokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); + + // Make sure we give the receiver contract enough tokens like CCIP would. + deal(token, address(s_receiver), amount); + + // The receiver contract will revert if the router is not the sender. + vm.startPrank(address(s_destRouter)); + + vm.expectEmit(); + emit MessageFailed( + messageId, abi.encodeWithSelector(bytes4(CCIPClientBase.InvalidSender.selector), abi.encode(address(s_receiver))) + ); + + s_receiver.ccipReceive( + Client.Any2EVMMessage({ + messageId: messageId, + sourceChainSelector: sourceChainSelector, + sender: abi.encode(address(s_receiver)), + data: "", + destTokenAmounts: destTokenAmounts + }) + ); + } + + function test_withdraw_nativeToken_to_owner() public { + uint256 amount = 100 ether; + deal(address(s_receiver), amount); + + uint256 balanceBefore = OWNER.balance; + + vm.startPrank(OWNER); + + s_receiver.withdrawNativeToken(payable(OWNER), amount); + + assertEq(OWNER.balance, balanceBefore + amount); + } +} diff --git a/contracts/src/v0.8/ccip/test/applications/external/CCIPReceiverWithAckTest.t.sol b/contracts/src/v0.8/ccip/test/applications/external/CCIPReceiverWithAckTest.t.sol new file mode 100644 index 0000000000..eca03f56f1 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/applications/external/CCIPReceiverWithAckTest.t.sol @@ -0,0 +1,173 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {CCIPClientBase} from "../../../applications/external/CCIPClientBase.sol"; +import {CCIPReceiverWithACK} from "../../../applications/external/CCIPReceiverWithACK.sol"; + +import {Client} from "../../../libraries/Client.sol"; +import {EVM2EVMOnRampSetup} from "../../onRamp/EVM2EVMOnRampSetup.t.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; + +contract CCIPReceiverWithAckTest is EVM2EVMOnRampSetup { + event MessageFailed(bytes32 indexed messageId, bytes reason); + event MessageSucceeded(bytes32 indexed messageId); + event MessageRecovered(bytes32 indexed messageId); + event MessageSent(bytes32 indexed incomingmessageId, bytes32 indexed ackmessageId); + event MessageAckSent(bytes32 incomingMessageId); + event MessageAckReceived(bytes32); + + CCIPReceiverWithACK internal s_receiver; + uint64 internal destChainSelector = DEST_CHAIN_SELECTOR; + + function setUp() public virtual override { + EVM2EVMOnRampSetup.setUp(); + + s_receiver = new CCIPReceiverWithACK(address(s_sourceRouter), IERC20(s_sourceFeeToken)); + s_receiver.enableChain(destChainSelector, abi.encode(address(s_receiver)), ""); + + CCIPClientBase.ApprovedSenderUpdate[] memory senderUpdates = new CCIPClientBase.ApprovedSenderUpdate[](1); + senderUpdates[0] = CCIPClientBase.ApprovedSenderUpdate({ + destChainSelector: destChainSelector, + sender: abi.encode(address(s_receiver)) + }); + + s_receiver.updateApprovedSenders(senderUpdates, new CCIPClientBase.ApprovedSenderUpdate[](0)); + } + + function test_ccipReceive_and_respond_with_ack() public { + bytes32 messageId = keccak256("messageId"); + bytes32 ackMessageId = 0x37ddbb21a51d4e07877b0de816905ea806b958e7607d951d307030631db076bd; + address token = address(s_sourceFeeToken); + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](0); + + // Make sure we give the receiver contract enough tokens like CCIP would. + deal(token, address(s_receiver), 1e24); + + // The receiver contract will revert if the router is not the sender. + vm.startPrank(address(s_sourceRouter)); + + CCIPReceiverWithACK.MessagePayload memory payload = CCIPReceiverWithACK.MessagePayload({ + version: "", + data: "FAKE_DATA", + messageType: CCIPReceiverWithACK.MessageType.OUTGOING + }); + + Client.EVM2AnyMessage memory ackMessage = Client.EVM2AnyMessage({ + receiver: abi.encode(address(s_receiver)), + data: abi.encode(s_receiver.ACK_MESSAGE_HEADER(), messageId), + tokenAmounts: destTokenAmounts, + feeToken: s_sourceFeeToken, + extraArgs: "" + }); + + uint256 feeTokenAmount = s_sourceRouter.getFee(destChainSelector, ackMessage); + + uint256 receiverBalanceBefore = IERC20(s_sourceFeeToken).balanceOf(address(s_receiver)); + + vm.expectEmit(); + emit MessageSent(messageId, ackMessageId); + + s_receiver.ccipReceive( + Client.Any2EVMMessage({ + messageId: messageId, + sourceChainSelector: destChainSelector, + sender: abi.encode(address(s_receiver)), + data: abi.encode(payload), + destTokenAmounts: destTokenAmounts + }) + ); + + // Check that fee token is properly subtracted from balance to pay for ack message + assertEq(IERC20(s_sourceFeeToken).balanceOf(address(s_receiver)), receiverBalanceBefore - feeTokenAmount); + } + + function test_ccipReceive_ack_message() public { + bytes32 messageId = keccak256("messageId"); + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](0); + + // The receiver contract will revert if the router is not the sender. + vm.startPrank(address(s_sourceRouter)); + + CCIPReceiverWithACK.MessagePayload memory payload = CCIPReceiverWithACK.MessagePayload({ + version: "", + data: abi.encode(s_receiver.ACK_MESSAGE_HEADER(), messageId), + messageType: CCIPReceiverWithACK.MessageType.ACK + }); + + vm.expectEmit(); + emit MessageAckReceived(messageId); + + s_receiver.ccipReceive( + Client.Any2EVMMessage({ + messageId: messageId, + sourceChainSelector: destChainSelector, + sender: abi.encode(address(s_receiver)), + data: abi.encode(payload), + destTokenAmounts: destTokenAmounts + }) + ); + + assertEq( + uint256(s_receiver.s_messageStatus(messageId)), + uint256(CCIPReceiverWithACK.MessageStatus.ACKNOWLEDGED), + "Ack message was not properly received" + ); + } + + function test_ccipReceiver_ack_with_invalidAckMessageHeaderBytes_REVERT() public { + bytes32 messageId = keccak256("messageId"); + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](0); + + // The receiver contract will revert if the router is not the sender. + vm.startPrank(address(s_sourceRouter)); + + // Payload with incorrect ack message header should revert + CCIPReceiverWithACK.MessagePayload memory payload = CCIPReceiverWithACK.MessagePayload({ + version: "", + data: abi.encode("RANDOM_BYTES", messageId), + messageType: CCIPReceiverWithACK.MessageType.ACK + }); + + // Expect the processing to revert from invalid Ack Message Header + vm.expectEmit(); + emit MessageFailed(messageId, abi.encodeWithSelector(bytes4(CCIPReceiverWithACK.InvalidAckMessageHeader.selector))); + + s_receiver.ccipReceive( + Client.Any2EVMMessage({ + messageId: messageId, + sourceChainSelector: destChainSelector, + sender: abi.encode(address(s_receiver)), + data: abi.encode(payload), + destTokenAmounts: destTokenAmounts + }) + ); + + // Check that message status is failed + assertEq(s_receiver.getMessageStatus(messageId), 1); + } + + function test_modifyFeeToken() public { + // WETH is used as a placeholder for any ERC20 token + address WETH = s_sourceRouter.getWrappedNative(); + + vm.expectEmit(); + emit IERC20.Approval(address(s_receiver), address(s_sourceRouter), 0); + + vm.expectEmit(); + emit CCIPReceiverWithACK.FeeTokenModified(s_sourceFeeToken, WETH); + + s_receiver.modifyFeeToken(WETH); + + IERC20 newFeeToken = s_receiver.s_feeToken(); + assertEq(address(newFeeToken), WETH); + assertEq(newFeeToken.allowance(address(s_receiver), address(s_sourceRouter)), type(uint256).max); + assertEq(IERC20(s_sourceFeeToken).allowance(address(s_receiver), address(s_sourceRouter)), 0); + } + + function test_feeTokenApproval_in_constructor() public { + CCIPReceiverWithACK newReceiver = new CCIPReceiverWithACK(address(s_sourceRouter), IERC20(s_sourceFeeToken)); + + assertEq(IERC20(s_sourceFeeToken).allowance(address(newReceiver), address(s_sourceRouter)), type(uint256).max); + } +} diff --git a/contracts/src/v0.8/ccip/test/applications/external/CCIPSenderTest.t.sol b/contracts/src/v0.8/ccip/test/applications/external/CCIPSenderTest.t.sol new file mode 100644 index 0000000000..5dda0bf18f --- /dev/null +++ b/contracts/src/v0.8/ccip/test/applications/external/CCIPSenderTest.t.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {CCIPClientBase} from "../../../applications/external/CCIPClientBase.sol"; +import {CCIPSender} from "../../../applications/external/CCIPSender.sol"; + +import {Client} from "../../../libraries/Client.sol"; +import {EVM2EVMOnRampSetup} from "../../onRamp/EVM2EVMOnRampSetup.t.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {IRouterClient} from "../../../interfaces/IRouterClient.sol"; + +contract CCIPSenderTest is EVM2EVMOnRampSetup { + event MessageFailed(bytes32 indexed messageId, bytes reason); + event MessageSucceeded(bytes32 indexed messageId); + event MessageRecovered(bytes32 indexed messageId); + + CCIPSender internal s_sender; + + function setUp() public virtual override { + EVM2EVMOnRampSetup.setUp(); + + s_sender = new CCIPSender(address(s_sourceRouter)); + s_sender.enableChain(DEST_CHAIN_SELECTOR, abi.encode(address(s_sender)), ""); + } + + function test_ccipSend_withNonNativeFeetoken_andDestTokens() public { + address token = address(s_sourceFeeToken); + uint256 amount = 111333333777; + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); + destTokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); + + // Make sure we give the receiver contract enough tokens like CCIP would. + IERC20(token).approve(address(s_sender), type(uint256).max); + + Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ + receiver: abi.encode(address(s_sender)), + data: "", + tokenAmounts: destTokenAmounts, + feeToken: s_sourceFeeToken, + extraArgs: "" + }); + + uint256 feeTokenAmount = s_sourceRouter.getFee(DEST_CHAIN_SELECTOR, message); + uint256 feeTokenBalanceBefore = IERC20(s_sourceFeeToken).balanceOf(OWNER); + + s_sender.ccipSend({ + destChainSelector: DEST_CHAIN_SELECTOR, + tokenAmounts: destTokenAmounts, + data: "", + feeToken: address(s_sourceFeeToken) + }); + + // Assert that tokens were transfered for bridging + fees + assertEq(IERC20(token).balanceOf(OWNER), feeTokenBalanceBefore - amount - feeTokenAmount); + } + + function test_ccipSend_withNonNativeFeetoken_andNoDestTokens() public { + address token = address(s_sourceFeeToken); + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](0); + + // Make sure we give the receiver contract enough tokens like CCIP would. + IERC20(token).approve(address(s_sender), type(uint256).max); + + Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ + receiver: abi.encode(address(s_sender)), + data: "", + tokenAmounts: destTokenAmounts, + feeToken: s_sourceFeeToken, + extraArgs: "" + }); + + uint256 feeTokenAmount = s_sourceRouter.getFee(DEST_CHAIN_SELECTOR, message); + uint256 feeTokenBalanceBefore = IERC20(s_sourceFeeToken).balanceOf(OWNER); + + s_sender.ccipSend({ + destChainSelector: DEST_CHAIN_SELECTOR, + tokenAmounts: destTokenAmounts, + data: "", + feeToken: address(s_sourceFeeToken) + }); + + // Assert that tokens were transfered for bridging + fees + assertEq(IERC20(token).balanceOf(OWNER), feeTokenBalanceBefore - feeTokenAmount); + } + + function test_ccipSend_with_NativeFeeToken_andDestTokens() public { + address token = address(s_sourceFeeToken); + uint256 amount = 111333333777; + Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](1); + destTokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); + + // Make sure we give the receiver contract enough tokens like CCIP would. + IERC20(token).approve(address(s_sender), type(uint256).max); + + Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ + receiver: abi.encode(address(s_sender)), + data: "", + tokenAmounts: destTokenAmounts, + feeToken: address(0), + extraArgs: "" + }); + + uint256 feeTokenAmount = s_sourceRouter.getFee(DEST_CHAIN_SELECTOR, message); + uint256 tokenBalanceBefore = IERC20(token).balanceOf(OWNER); + uint256 nativeFeeTokenBalanceBefore = OWNER.balance; + + s_sender.ccipSend{value: feeTokenAmount}({ + destChainSelector: DEST_CHAIN_SELECTOR, + tokenAmounts: destTokenAmounts, + data: "", + feeToken: address(0) + }); + + // Assert that native fees are paid successfully and tokens are transferred + assertEq(IERC20(token).balanceOf(OWNER), tokenBalanceBefore - amount); + assertEq(OWNER.balance, nativeFeeTokenBalanceBefore - feeTokenAmount); + } +} diff --git a/contracts/src/v0.8/ccip/test/applications/PingPongDemo.t.sol b/contracts/src/v0.8/ccip/test/applications/internal/PingPongDemoTest.t.sol similarity index 88% rename from contracts/src/v0.8/ccip/test/applications/PingPongDemo.t.sol rename to contracts/src/v0.8/ccip/test/applications/internal/PingPongDemoTest.t.sol index 3297e1f4fb..feb8b2ff7f 100644 --- a/contracts/src/v0.8/ccip/test/applications/PingPongDemo.t.sol +++ b/contracts/src/v0.8/ccip/test/applications/internal/PingPongDemoTest.t.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.24; -import {PingPongDemo} from "../../applications/PingPongDemo.sol"; -import {Client} from "../../libraries/Client.sol"; -import "../onRamp/EVM2EVMOnRampSetup.t.sol"; +import {PingPongDemo} from "../../../applications/internal/PingPongDemo.sol"; +import {Client} from "../../../libraries/Client.sol"; +import "../../onRamp/EVM2EVMOnRampSetup.t.sol"; // setup contract PingPongDappSetup is EVM2EVMOnRampSetup { @@ -23,10 +23,12 @@ contract PingPongDappSetup is EVM2EVMOnRampSetup { // Fund the contract with LINK tokens s_feeToken.transfer(address(s_pingPong), fundingAmount); + + IERC20(s_feeToken).approve(address(s_pingPong), type(uint256).max); } } -contract PingPong_startPingPong is PingPongDappSetup { +contract PingPong_example_startPingPong is PingPongDappSetup { function test_StartPingPong_Success() public { uint256 pingPongNumber = 1; bytes memory data = abi.encode(pingPongNumber); @@ -68,7 +70,7 @@ contract PingPong_startPingPong is PingPongDappSetup { } } -contract PingPong_ccipReceive is PingPongDappSetup { +contract PingPong_example_ccipReceive is PingPongDappSetup { function test_CcipReceive_Success() public { Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](0); @@ -91,7 +93,7 @@ contract PingPong_ccipReceive is PingPongDappSetup { } } -contract PingPong_plumbing is PingPongDappSetup { +contract PingPong_example_plumbing is PingPongDappSetup { function test_Fuzz_CounterPartChainSelector_Success(uint64 chainSelector) public { s_pingPong.setCounterpartChainSelector(chainSelector); diff --git a/contracts/src/v0.8/ccip/test/applications/SelfFundedPingPong.t.sol b/contracts/src/v0.8/ccip/test/applications/internal/SelfFundedPingPong.t.sol similarity index 74% rename from contracts/src/v0.8/ccip/test/applications/SelfFundedPingPong.t.sol rename to contracts/src/v0.8/ccip/test/applications/internal/SelfFundedPingPong.t.sol index d5db9d1f9d..ce50597417 100644 --- a/contracts/src/v0.8/ccip/test/applications/SelfFundedPingPong.t.sol +++ b/contracts/src/v0.8/ccip/test/applications/internal/SelfFundedPingPong.t.sol @@ -1,12 +1,14 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.24; -import {SelfFundedPingPong} from "../../applications/SelfFundedPingPong.sol"; -import {Client} from "../../libraries/Client.sol"; -import {EVM2EVMOnRamp} from "../../onRamp/EVM2EVMOnRamp.sol"; -import {EVM2EVMOnRampSetup} from "../onRamp/EVM2EVMOnRampSetup.t.sol"; +import {CCIPReceiver} from "../../../applications/external/CCIPReceiver.sol"; +import {SelfFundedPingPong} from "../../../applications/internal/SelfFundedPingPong.sol"; -import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {Client} from "../../../libraries/Client.sol"; +import {EVM2EVMOnRamp} from "../../../onRamp/EVM2EVMOnRamp.sol"; +import {EVM2EVMOnRampSetup} from "../../onRamp/EVM2EVMOnRampSetup.t.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; contract SelfFundedPingPongDappSetup is EVM2EVMOnRampSetup { SelfFundedPingPong internal s_pingPong; @@ -79,8 +81,16 @@ contract SelfFundedPingPong_ccipReceive is SelfFundedPingPongDappSetup { destTokenAmounts: new Client.EVMTokenAmount[](0) }); - // because pingPong is not set as a nop - vm.expectRevert(EVM2EVMOnRamp.OnlyCallableByOwnerOrAdminOrNop.selector); + // Because pingPong is not set as a nop expect call to occur, but the tx will not revert since it occurs inside a try-catch + vm.expectCall(address(s_onRamp), abi.encodePacked(EVM2EVMOnRamp.payNops.selector)); + + // Check that the revert occured as expected by watching for MessageFailed + // We don't care what the messageId was, only that the call failed for the right reason, so we check the revert string on the third topic + vm.expectEmit(false, false, true, false); + emit CCIPReceiver.MessageFailed( + bytes32(0), abi.encodePacked(EVM2EVMOnRamp.OnlyCallableByOwnerOrAdminOrNop.selector) + ); + s_pingPong.ccipReceive(message); } } diff --git a/contracts/src/v0.8/ccip/test/applications/TokenProxy.t.sol b/contracts/src/v0.8/ccip/test/applications/internal/TokenProxy.t.sol similarity index 94% rename from contracts/src/v0.8/ccip/test/applications/TokenProxy.t.sol rename to contracts/src/v0.8/ccip/test/applications/internal/TokenProxy.t.sol index 9e78f6e369..aecde32a75 100644 --- a/contracts/src/v0.8/ccip/test/applications/TokenProxy.t.sol +++ b/contracts/src/v0.8/ccip/test/applications/internal/TokenProxy.t.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import {TokenProxy} from "../../applications/TokenProxy.sol"; -import {Client} from "../../libraries/Client.sol"; -import {Internal} from "../../libraries/Internal.sol"; -import {EVM2EVMOnRamp} from "../../onRamp/EVM2EVMOnRamp.sol"; -import {EVM2EVMOnRampSetup} from "../onRamp/EVM2EVMOnRampSetup.t.sol"; +import {TokenProxy} from "../../../applications/internal/TokenProxy.sol"; +import {Client} from "../../../libraries/Client.sol"; +import {Internal} from "../../../libraries/Internal.sol"; +import {EVM2EVMOnRamp} from "../../../onRamp/EVM2EVMOnRamp.sol"; +import {EVM2EVMOnRampSetup} from "../../onRamp/EVM2EVMOnRampSetup.t.sol"; -import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; contract TokenProxySetup is EVM2EVMOnRampSetup { TokenProxy internal s_tokenProxy; diff --git a/contracts/src/v0.8/ccip/test/helpers/EtherSenderReceiverHelper.sol b/contracts/src/v0.8/ccip/test/helpers/EtherSenderReceiverHelper.sol index 71a5cdc7ab..ab9f74d16d 100644 --- a/contracts/src/v0.8/ccip/test/helpers/EtherSenderReceiverHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/EtherSenderReceiverHelper.sol @@ -1,11 +1,35 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.24; -import {EtherSenderReceiver} from "../../applications/EtherSenderReceiver.sol"; +import {CCIPSender} from "../../applications/external/CCIPSender.sol"; import {Client} from "../../libraries/Client.sol"; +import {CCIPReceiverBasic} from "./receivers/CCIPReceiverBasic.sol"; -contract EtherSenderReceiverHelper is EtherSenderReceiver { - constructor(address router) EtherSenderReceiver(router) {} +import {IWrappedNative} from "../../interfaces/IWrappedNative.sol"; + +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; + +interface CCIPRouter { + function getWrappedNative() external view returns (address); +} + +contract EtherSenderReceiverHelper is CCIPSender { + using SafeERC20 for IERC20; + + error InvalidTokenAmounts(uint256 gotAmounts); + error InvalidToken(address gotToken, address expectedToken); + error TokenAmountNotEqualToMsgValue(uint256 gotAmount, uint256 msgValue); + error InsufficientMsgValue(uint256 gotAmount, uint256 msgValue); + error InsufficientFee(uint256 gotFee, uint256 fee); + error GasLimitTooLow(uint256 minLimit, uint256 gotLimit); + + IWrappedNative public immutable i_weth; + + constructor(address router) CCIPSender(router) { + i_weth = IWrappedNative(CCIPRouter(router).getWrappedNative()); + IERC20(i_weth).safeApprove(router, type(uint256).max); + } function validatedMessage(Client.EVM2AnyMessage calldata message) public view returns (Client.EVM2AnyMessage memory) { return _validatedMessage(message); @@ -15,7 +39,47 @@ contract EtherSenderReceiverHelper is EtherSenderReceiver { _validateFeeToken(message); } + function _validateFeeToken(Client.EVM2AnyMessage calldata message) internal view { + uint256 tokenAmount = message.tokenAmounts[0].amount; + + if (message.feeToken != address(0)) { + // If the fee token is NOT native, then the token amount must be equal to msg.value. + // This is done to ensure that there is no leftover ether in this contract. + if (msg.value != tokenAmount) { + revert TokenAmountNotEqualToMsgValue(tokenAmount, msg.value); + } + } + } + + /// @notice Validate the message content. + /// @dev Only allows a single token to be sent. Always overwritten to be address(i_weth) + /// and receiver is always msg.sender. + function _validatedMessage(Client.EVM2AnyMessage calldata message) + internal + view + returns (Client.EVM2AnyMessage memory) + { + Client.EVM2AnyMessage memory validMessage = message; + + if (validMessage.tokenAmounts.length != 1) { + revert InvalidTokenAmounts(validMessage.tokenAmounts.length); + } + + validMessage.data = abi.encode(msg.sender); + validMessage.tokenAmounts[0].token = address(i_weth); + + return validMessage; + } + function publicCcipReceive(Client.Any2EVMMessage memory message) public { _ccipReceive(message); } + + function ccipReceive(Client.Any2EVMMessage calldata message) external virtual onlyRouter { + _ccipReceive(message); + } + + /// @notice Override this function in your implementation. + /// @param message Any2EVMMessage + function _ccipReceive(Client.Any2EVMMessage memory message) internal virtual {} } diff --git a/contracts/src/v0.8/ccip/applications/CCIPReceiver.sol b/contracts/src/v0.8/ccip/test/helpers/receivers/CCIPReceiverBasic.sol similarity index 58% rename from contracts/src/v0.8/ccip/applications/CCIPReceiver.sol rename to contracts/src/v0.8/ccip/test/helpers/receivers/CCIPReceiverBasic.sol index 7011f814de..a457ea1793 100644 --- a/contracts/src/v0.8/ccip/applications/CCIPReceiver.sol +++ b/contracts/src/v0.8/ccip/test/helpers/receivers/CCIPReceiverBasic.sol @@ -1,19 +1,19 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {IAny2EVMMessageReceiver} from "../interfaces/IAny2EVMMessageReceiver.sol"; +import {IAny2EVMMessageReceiver} from "../../../interfaces/IAny2EVMMessageReceiver.sol"; -import {Client} from "../libraries/Client.sol"; +import {IERC165} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol"; -import {IERC165} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol"; +import {CCIPClientBase} from "../../../applications/external/CCIPClientBase.sol"; +import {Client} from "../../../libraries/Client.sol"; /// @title CCIPReceiver - Base contract for CCIP applications that can receive messages. -abstract contract CCIPReceiver is IAny2EVMMessageReceiver, IERC165 { - address internal immutable i_ccipRouter; +contract CCIPReceiverBasic is CCIPClientBase, IAny2EVMMessageReceiver, IERC165 { + constructor(address router) CCIPClientBase(router) {} - constructor(address router) { - if (router == address(0)) revert InvalidRouter(address(0)); - i_ccipRouter = router; + function typeAndVersion() external pure virtual returns (string memory) { + return "CCIPReceiverBasic 1.0.0-dev"; } /// @notice IERC165 supports an interfaceId @@ -37,23 +37,5 @@ abstract contract CCIPReceiver is IAny2EVMMessageReceiver, IERC165 { /// @notice Override this function in your implementation. /// @param message Any2EVMMessage - function _ccipReceive(Client.Any2EVMMessage memory message) internal virtual; - - ///////////////////////////////////////////////////////////////////// - // Plumbing - ///////////////////////////////////////////////////////////////////// - - /// @notice Return the current router - /// @return CCIP router address - function getRouter() public view virtual returns (address) { - return address(i_ccipRouter); - } - - error InvalidRouter(address router); - - /// @dev only calls from the set router are accepted. - modifier onlyRouter() { - if (msg.sender != getRouter()) revert InvalidRouter(msg.sender); - _; - } + function _ccipReceive(Client.Any2EVMMessage memory message) internal virtual {} } diff --git a/contracts/src/v0.8/ccip/test/helpers/receivers/CCIPReceiverReverting.sol b/contracts/src/v0.8/ccip/test/helpers/receivers/CCIPReceiverReverting.sol new file mode 100644 index 0000000000..444b066955 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/helpers/receivers/CCIPReceiverReverting.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.0; + +import {CCIPReceiver} from "../../../applications/external/CCIPReceiver.sol"; +import {Client} from "../../../libraries/Client.sol"; + +contract CCIPReceiverReverting is CCIPReceiver { + error ErrorCase(); + + bool private s_simRevert; + + constructor(address router) CCIPReceiver(router) {} + + /// @notice This function the entrypoint for this contract to process messages. + /// @param message The message to process. + /// @dev This example just sends the tokens to the owner of this contracts. More + /// interesting functions could be implemented. + /// @dev It has to be external because of the try/catch. + function processMessage(Client.Any2EVMMessage calldata message) + external + view + override + onlySelf + isValidSender(message.sourceChainSelector, message.sender) + { + // Meant to help simulate a failed-message + if (s_simRevert) revert ErrorCase(); + } + + // An example function to demonstrate recovery + function setSimRevert(bool simRevert) external { + s_simRevert = simRevert; + } +} diff --git a/contracts/src/v0.8/ccip/test/helpers/receivers/ConformingReceiver.sol b/contracts/src/v0.8/ccip/test/helpers/receivers/ConformingReceiver.sol index 159cd7a851..8478217d46 100644 --- a/contracts/src/v0.8/ccip/test/helpers/receivers/ConformingReceiver.sol +++ b/contracts/src/v0.8/ccip/test/helpers/receivers/ConformingReceiver.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.24; -import {CCIPReceiver} from "../../../applications/CCIPReceiver.sol"; import {Client} from "../../../libraries/Client.sol"; +import {CCIPReceiverBasic} from "./CCIPReceiverBasic.sol"; -contract ConformingReceiver is CCIPReceiver { +contract ConformingReceiver is CCIPReceiverBasic { event MessageReceived(); - constructor(address router, address feeToken) CCIPReceiver(router) {} + constructor(address router, address feeToken) CCIPReceiverBasic(router) {} function _ccipReceive(Client.Any2EVMMessage memory) internal virtual override { emit MessageReceived(); diff --git a/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuser.sol b/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuser.sol index ae8759099c..5530dcc333 100644 --- a/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuser.sol +++ b/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuser.sol @@ -1,19 +1,19 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.24; -import {CCIPReceiver} from "../../../applications/CCIPReceiver.sol"; import {Client} from "../../../libraries/Client.sol"; import {Internal} from "../../../libraries/Internal.sol"; import {EVM2EVMOffRamp} from "../../../offRamp/EVM2EVMOffRamp.sol"; +import {CCIPReceiverBasic} from "./CCIPReceiverBasic.sol"; -contract ReentrancyAbuser is CCIPReceiver { +contract ReentrancyAbuser is CCIPReceiverBasic { event ReentrancySucceeded(); bool internal s_ReentrancyDone = false; Internal.ExecutionReport internal s_payload; EVM2EVMOffRamp internal s_offRamp; - constructor(address router, EVM2EVMOffRamp offRamp) CCIPReceiver(router) { + constructor(address router, EVM2EVMOffRamp offRamp) CCIPReceiverBasic(router) { s_offRamp = offRamp; } diff --git a/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuserMultiRamp.sol b/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuserMultiRamp.sol index c9e7d7e8ad..11dcb6bbf1 100644 --- a/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuserMultiRamp.sol +++ b/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuserMultiRamp.sol @@ -1,19 +1,19 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.19; -import {CCIPReceiver} from "../../../applications/CCIPReceiver.sol"; import {Client} from "../../../libraries/Client.sol"; import {Internal} from "../../../libraries/Internal.sol"; import {EVM2EVMMultiOffRamp} from "../../../offRamp/EVM2EVMMultiOffRamp.sol"; +import {CCIPReceiverBasic} from "./CCIPReceiverBasic.sol"; -contract ReentrancyAbuserMultiRamp is CCIPReceiver { +contract ReentrancyAbuserMultiRamp is CCIPReceiverBasic { event ReentrancySucceeded(); bool internal s_ReentrancyDone = false; Internal.ExecutionReportSingleChain internal s_payload; EVM2EVMMultiOffRamp internal s_offRamp; - constructor(address router, EVM2EVMMultiOffRamp offRamp) CCIPReceiver(router) { + constructor(address router, EVM2EVMMultiOffRamp offRamp) CCIPReceiverBasic(router) { s_offRamp = offRamp; } diff --git a/core/gethwrappers/ccip/generated/ccipClient/ccipClient.go b/core/gethwrappers/ccip/generated/ccipClient/ccipClient.go new file mode 100644 index 0000000000..1b906234e0 --- /dev/null +++ b/core/gethwrappers/ccip/generated/ccipClient/ccipClient.go @@ -0,0 +1,2069 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ccipClient + +import ( + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +type CCIPClientBaseApprovedSenderUpdate struct { + DestChainSelector uint64 + Sender []byte +} + +type ClientAny2EVMMessage struct { + MessageId [32]byte + SourceChainSelector uint64 + Sender []byte + Data []byte + DestTokenAmounts []ClientEVMTokenAmount +} + +type ClientEVMTokenAmount struct { + Token common.Address + Amount *big.Int +} + +var CCIPClientMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"feeToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"CannotAcknowledgeUnsentMessage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAckMessageHeader\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"}],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"InvalidRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"name\":\"InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageAlreadyAcknowledged\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageNotFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySelf\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newToken\",\"type\":\"address\"}],\"name\":\"FeeTokenModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenReceiver\",\"type\":\"address\"}],\"name\":\"MessageAbandoned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"MessageAckReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"incomingMessageId\",\"type\":\"bytes32\"}],\"name\":\"MessageAckSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageRecovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"incomingMessageId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ACKMessageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ACK_MESSAGE_HEADER\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"abandonFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"ccipReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ccipSend\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"disableChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_extraArgsBytes\",\"type\":\"bytes\"}],\"name\":\"enableChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"getMessageContents\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"getMessageStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"senderAddr\",\"type\":\"bytes\"}],\"name\":\"isApprovedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"modifyFeeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"processMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"retryFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"s_chainConfigs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraArgsBytes\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_feeToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"s_messageStatus\",\"outputs\":[{\"internalType\":\"enumCCIPReceiverWithACK.MessageStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPClientBase.ApprovedSenderUpdate[]\",\"name\":\"adds\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPClientBase.ApprovedSenderUpdate[]\",\"name\":\"removes\",\"type\":\"tuple[]\"}],\"name\":\"updateApprovedSenders\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawNativeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60a06040523480156200001157600080fd5b50604051620045573803806200455783398101604081905262000034916200055f565b8181818033806000816200008f5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c257620000c2816200013b565b5050506001600160a01b038116620000ed576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b03908116608052600780546001600160a01b03191691841691821790551590506200013157620001316001600160a01b03821683600019620001e6565b5050505062000684565b336001600160a01b03821603620001955760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000086565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa15801562000238573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200025e91906200059e565b6200026a9190620005b8565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152919250620002c691869190620002cc16565b50505050565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908201526000906200031b906001600160a01b038516908490620003a2565b8051909150156200039d57808060200190518101906200033c9190620005e0565b6200039d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000086565b505050565b6060620003b38484600085620003bb565b949350505050565b6060824710156200041e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000086565b600080866001600160a01b031685876040516200043c919062000631565b60006040518083038185875af1925050503d80600081146200047b576040519150601f19603f3d011682016040523d82523d6000602084013e62000480565b606091505b50909250905062000494878383876200049f565b979650505050505050565b60608315620005135782516000036200050b576001600160a01b0385163b6200050b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000086565b5081620003b3565b620003b383838151156200052a5781518083602001fd5b8060405162461bcd60e51b81526004016200008691906200064f565b6001600160a01b03811681146200055c57600080fd5b50565b600080604083850312156200057357600080fd5b8251620005808162000546565b6020840151909250620005938162000546565b809150509250929050565b600060208284031215620005b157600080fd5b5051919050565b80820180821115620005da57634e487b7160e01b600052601160045260246000fd5b92915050565b600060208284031215620005f357600080fd5b815180151581146200060457600080fd5b9392505050565b60005b83811015620006285781810151838201526020016200060e565b50506000910152565b60008251620006458184602087016200060b565b9190910192915050565b6020815260008251806020840152620006708160408501602087016200060b565b601f01601f19169190910160400192915050565b608051613e7f620006d86000396000818161047a015281816105d4015281816106640152818161111501528181611bda01528181611ca301528181611d7b015281816125fb01526126c70152613e7f6000f3fe6080604052600436106101845760003560e01c80636fef519e116100d6578063cf6730f81161007f578063e89b448511610059578063e89b4485146104fe578063f2fde38b14610511578063ff2deec31461053157600080fd5b8063cf6730f81461049e578063d8469e40146104be578063e4ca8754146104de57600080fd5b806385572ffb116100b057806385572ffb146103ff5780638da5cb5b1461041f578063b0f479a11461046b57600080fd5b80636fef519e1461038157806379ba5097146103ca5780638462a2b9146103df57600080fd5b806341eade46116101385780635e35359e116101125780635e35359e146103145780636939cd97146103345780636d62d6331461036157600080fd5b806341eade46146102a65780635075a9d4146102c6578063536c6bfa146102f457600080fd5b806311e85dff1161016957806311e85dff14610206578063181f5a771461022857806335f170ef1461027757600080fd5b806305bfe982146101905780630e958d6b146101d657600080fd5b3661018b57005b600080fd5b34801561019c57600080fd5b506101c06101ab366004612d33565b60086020526000908152604090205460ff1681565b6040516101cd9190612d7b565b60405180910390f35b3480156101e257600080fd5b506101f66101f1366004612e1b565b61055e565b60405190151581526020016101cd565b34801561021257600080fd5b50610226610221366004612e92565b6105a9565b005b34801561023457600080fd5b5060408051808201909152601481527f43434950436c69656e7420312e302e302d64657600000000000000000000000060208201525b6040516101cd9190612f1d565b34801561028357600080fd5b50610297610292366004612f30565b610721565b6040516101cd93929190612f4d565b3480156102b257600080fd5b506102266102c1366004612f30565b610858565b3480156102d257600080fd5b506102e66102e1366004612d33565b6108a3565b6040519081526020016101cd565b34801561030057600080fd5b5061022661030f366004612f84565b6108b6565b34801561032057600080fd5b5061022661032f366004612fb0565b6108cc565b34801561034057600080fd5b5061035461034f366004612d33565b6108fa565b6040516101cd919061304e565b34801561036d57600080fd5b5061022661037c3660046130eb565b610b05565b34801561038d57600080fd5b5061026a6040518060400160405280601581526020017f4d4553534147455f41434b4e4f574c45444745445f000000000000000000000081525081565b3480156103d657600080fd5b50610226610e1f565b3480156103eb57600080fd5b506102266103fa366004613160565b610f1c565b34801561040b57600080fd5b5061022661041a3660046131cc565b6110fd565b34801561042b57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101cd565b34801561047757600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610446565b3480156104aa57600080fd5b506102266104b93660046131cc565b6113f8565b3480156104ca57600080fd5b506102266104d9366004613207565b611615565b3480156104ea57600080fd5b506102266104f9366004612d33565b611696565b6102e661050c3660046133f0565b6118ff565b34801561051d57600080fd5b5061022661052c366004612e92565b611e83565b34801561053d57600080fd5b506007546104469073ffffffffffffffffffffffffffffffffffffffff1681565b67ffffffffffffffff8316600090815260026020526040808220905160039091019061058d90859085906134fd565b9081526040519081900360200190205460ff1690509392505050565b6105b1611e97565b60075473ffffffffffffffffffffffffffffffffffffffff1615610614576106147f000000000000000000000000000000000000000000000000000000000000000060075473ffffffffffffffffffffffffffffffffffffffff16906000611f1a565b6007805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093551690156106c3576106c37f000000000000000000000000000000000000000000000000000000000000000060075473ffffffffffffffffffffffffffffffffffffffff16907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61211a565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f4a1cb6b940121ea2ba30fb9b494035cbfe2d4b6b080db8b502150410bef7eb4e60405160405180910390a35050565b6002602052600090815260409020805460018201805460ff90921692916107479061350d565b80601f01602080910402602001604051908101604052809291908181526020018280546107739061350d565b80156107c05780601f10610795576101008083540402835291602001916107c0565b820191906000526020600020905b8154815290600101906020018083116107a357829003601f168201915b5050505050908060020180546107d59061350d565b80601f01602080910402602001604051908101604052809291908181526020018280546108019061350d565b801561084e5780601f106108235761010080835404028352916020019161084e565b820191906000526020600020905b81548152906001019060200180831161083157829003601f168201915b5050505050905083565b610860611e97565b67ffffffffffffffff16600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60006108b060048361221e565b92915050565b6108be611e97565b6108c88282612231565b5050565b6108d4611e97565b6108f573ffffffffffffffffffffffffffffffffffffffff8416838361238b565b505050565b6040805160a08082018352600080835260208084018290526060848601819052808501819052608085015285825260038152908490208451928301855280548352600181015467ffffffffffffffff16918301919091526002810180549394929391928401916109699061350d565b80601f01602080910402602001604051908101604052809291908181526020018280546109959061350d565b80156109e25780601f106109b7576101008083540402835291602001916109e2565b820191906000526020600020905b8154815290600101906020018083116109c557829003601f168201915b505050505081526020016003820180546109fb9061350d565b80601f0160208091040260200160405190810160405280929190818152602001828054610a279061350d565b8015610a745780601f10610a4957610100808354040283529160200191610a74565b820191906000526020600020905b815481529060010190602001808311610a5757829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015610af75760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101610aa2565b505050915250909392505050565b610b0d611e97565b6001610b1a60048461221e565b14610b59576040517fb6e78260000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b610b698260025b600491906123e1565b506000828152600360209081526040808320815160a08101835281548152600182015467ffffffffffffffff16938101939093526002810180549192840191610bb19061350d565b80601f0160208091040260200160405190810160405280929190818152602001828054610bdd9061350d565b8015610c2a5780601f10610bff57610100808354040283529160200191610c2a565b820191906000526020600020905b815481529060010190602001808311610c0d57829003601f168201915b50505050508152602001600382018054610c439061350d565b80601f0160208091040260200160405190810160405280929190818152602001828054610c6f9061350d565b8015610cbc5780601f10610c9157610100808354040283529160200191610cbc565b820191906000526020600020905b815481529060010190602001808311610c9f57829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015610d3f5760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101610cea565b5050505081525050905060005b816080015151811015610dce57610dc68383608001518381518110610d7357610d73613560565b60200260200101516020015184608001518481518110610d9557610d95613560565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1661238b9092919063ffffffff16565b600101610d4c565b5060405173ffffffffffffffffffffffffffffffffffffffff8316815283907fd5038100bd3dc9631d3c3f4f61a3e53e9d466f40c47af9897292c7b35e32a9579060200160405180910390a2505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610b50565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610f24611e97565b60005b818110156110075760026000848484818110610f4557610f45613560565b9050602002810190610f57919061358f565b610f65906020810190612f30565b67ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600301838383818110610f9c57610f9c613560565b9050602002810190610fae919061358f565b610fbc9060208101906135cd565b604051610fca9291906134fd565b90815260405190819003602001902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600101610f27565b5060005b838110156110f65760016002600087878581811061102b5761102b613560565b905060200281019061103d919061358f565b61104b906020810190612f30565b67ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060030186868481811061108257611082613560565b9050602002810190611094919061358f565b6110a29060208101906135cd565b6040516110b09291906134fd565b90815260405190819003602001902080549115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090921691909117905560010161100b565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461116e576040517fd7f73334000000000000000000000000000000000000000000000000000000008152336004820152602401610b50565b61117e6040820160208301612f30565b61118b60408301836135cd565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525067ffffffffffffffff8616815260026020526040908190209051600390910193506111e99250849150613632565b9081526040519081900360200190205460ff1661123457806040517f5075bb38000000000000000000000000000000000000000000000000000000008152600401610b509190612f1d565b6112446040840160208501612f30565b67ffffffffffffffff8116600090815260026020526040902060018101805461126c9061350d565b1590508061127b5750805460ff165b156112be576040517fd79f2ea400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff83166004820152602401610b50565b6040517fcf6730f8000000000000000000000000000000000000000000000000000000008152309063cf6730f8906112fa908890600401613746565b600060405180830381600087803b15801561131457600080fd5b505af1925050508015611325575060015b6113c5573d808015611353576040519150601f19603f3d011682016040523d82523d6000602084013e611358565b606091505b5061136586356001610b60565b508535600090815260036020526040902086906113828282613b18565b50506040518635907f55bc02a9ef6f146737edeeb425738006f67f077e7138de3bf84a15bde1a5b56f906113b7908490612f1d565b60405180910390a2506110f6565b6040518535907fdf6958669026659bac75ba986685e11a7d271284989f565f2802522663e9a70f90600090a25050505050565b333014611431576040517f14d4a4e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061144060608301836135cd565b81019061144d9190613c12565b905060008160400151600181111561146757611467612d4c565b03611475576108c8826123f6565b60018160400151600181111561148d5761148d612d4c565b036108c85760008082602001518060200190518101906114ad9190613cbe565b60408051808201909152601581527f4d4553534147455f41434b4e4f574c45444745445f000000000000000000000060209182015282519083012091935091507f1c778f21871bcc06cfebd177c4d0360c2f3550962fb071f69ed007e4f55f23b214611545576040517fae15168d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160008281526008602052604090205460ff16600281111561156a5761156a612d4c565b146115a4576040517f3ec8770000000000000000000000000000000000000000000000000000000000815260048101829052602401610b50565b60008181526008602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600217905590518281527fef0cb160d3dc564cde61ae97d9981f9c4d92ace727a2ec202b18b223ea832a79910160405180910390a150505050565b61161d611e97565b67ffffffffffffffff851660009081526002602052604090206001810161164585878361389c565b50811561165d576002810161165b83858361389c565b505b805460ff161561168e5780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681555b505050505050565b61169e611e97565b60016116ab60048361221e565b146116e5576040517fb6e7826000000000000000000000000000000000000000000000000000000000815260048101829052602401610b50565b6116f0816000610b60565b506000818152600360209081526040808320815160a08101835281548152600182015467ffffffffffffffff169381019390935260028101805491928401916117389061350d565b80601f01602080910402602001604051908101604052809291908181526020018280546117649061350d565b80156117b15780601f10611786576101008083540402835291602001916117b1565b820191906000526020600020905b81548152906001019060200180831161179457829003601f168201915b505050505081526020016003820180546117ca9061350d565b80601f01602080910402602001604051908101604052809291908181526020018280546117f69061350d565b80156118435780601f1061181857610100808354040283529160200191611843565b820191906000526020600020905b81548152906001019060200180831161182657829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156118c65760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101611871565b5050505081525050905060405182907fef3bf8c64bc480286c4f3503b870ceb23e648d2d902e31fb7bb46680da6de8ad90600090a25050565b67ffffffffffffffff831660009081526002602052604081206001810180548692919061192b9061350d565b1590508061193a5750805460ff165b1561197d576040517fd79f2ea400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff83166004820152602401610b50565b6040805160a08101825267ffffffffffffffff88166000908152600260205291822060010180548291906119b09061350d565b80601f01602080910402602001604051908101604052809291908181526020018280546119dc9061350d565b8015611a295780601f106119fe57610100808354040283529160200191611a29565b820191906000526020600020905b815481529060010190602001808311611a0c57829003601f168201915b5050509183525050602080820188905260408083018a905260075473ffffffffffffffffffffffffffffffffffffffff16606084015267ffffffffffffffff8b16600090815260029283905220018054608090920191611a889061350d565b80601f0160208091040260200160405190810160405280929190818152602001828054611ab49061350d565b8015611b015780601f10611ad657610100808354040283529160200191611b01565b820191906000526020600020905b815481529060010190602001808311611ae457829003601f168201915b5050505050815250905060005b8651811015611c6257611b7e3330898481518110611b2e57611b2e613560565b6020026020010151602001518a8581518110611b4c57611b4c613560565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff166127a7909392919063ffffffff16565b600754875173ffffffffffffffffffffffffffffffffffffffff90911690889083908110611bae57611bae613560565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1614611c5a57611c5a7f0000000000000000000000000000000000000000000000000000000000000000888381518110611c0b57611c0b613560565b602002602001015160200151898481518110611c2957611c29613560565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1661211a9092919063ffffffff16565b600101611b0e565b506040517f20487ded00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906320487ded90611cda908b908690600401613d3f565b602060405180830381865afa158015611cf7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d1b9190613e02565b60075490915073ffffffffffffffffffffffffffffffffffffffff1615611d6157600754611d619073ffffffffffffffffffffffffffffffffffffffff163330846127a7565b60075473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116916396f4e9f9911615611db0576000611db2565b825b8a856040518463ffffffff1660e01b8152600401611dd1929190613d3f565b60206040518083038185885af1158015611def573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611e149190613e02565b60008181526008602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055519196509086907f9102b9031c3c59d8320bf14d84d7d7a3434366b91032fad1c87579cfc62b2372908390a3505050509392505050565b611e8b611e97565b611e9481612805565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314611f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610b50565b565b801580611fba57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa158015611f94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb89190613e02565b155b612046576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610b50565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526108f59084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526128fa565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015612191573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b59190613e02565b6121bf9190613e1b565b60405173ffffffffffffffffffffffffffffffffffffffff85166024820152604481018290529091506122189085907f095ea7b30000000000000000000000000000000000000000000000000000000090606401612098565b50505050565b600061222a8383612a06565b9392505050565b8047101561229b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b50565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146122f5576040519150601f19603f3d011682016040523d82523d6000602084013e6122fa565b606091505b50509050806108f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b50565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526108f59084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401612098565b60006123ee848484612a90565b949350505050565b6040805160008082526020820190925281612433565b604080518082019091526000808252602082015281526020019060019003908161240c5790505b50905060006040518060a0016040528084806040019061245391906135cd565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080518082018252601581527f4d4553534147455f41434b4e4f574c45444745445f00000000000000000000006020828101919091529151928201926124d49288359101613e2e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152908252602082810186905260075473ffffffffffffffffffffffffffffffffffffffff1683830152606090920191600291600091612544918901908901612f30565b67ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060020180546125749061350d565b80601f01602080910402602001604051908101604052809291908181526020018280546125a09061350d565b80156125ed5780601f106125c2576101008083540402835291602001916125ed565b820191906000526020600020905b8154815290600101906020018083116125d057829003601f168201915b5050505050815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166320487ded8560200160208101906126489190612f30565b846040518363ffffffff1660e01b8152600401612666929190613d3f565b602060405180830381865afa158015612683573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126a79190613e02565b60075490915060009073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116916396f4e9f99116156126fc5760006126fe565b835b61270e6040890160208a01612f30565b866040518463ffffffff1660e01b815260040161272c929190613d3f565b60206040518083038185885af115801561274a573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061276f9190613e02565b60405190915081908635907f9102b9031c3c59d8320bf14d84d7d7a3434366b91032fad1c87579cfc62b237290600090a35050505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526122189085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612098565b3373ffffffffffffffffffffffffffffffffffffffff821603612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610b50565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600061295c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612aad9092919063ffffffff16565b8051909150156108f5578080602001905181019061297a9190613e50565b6108f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b50565b600081815260028301602052604081205480151580612a2a5750612a2a8484612abc565b61222a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f456e756d657261626c654d61703a206e6f6e6578697374656e74206b657900006044820152606401610b50565b600082815260028401602052604081208290556123ee8484612ac8565b60606123ee8484600085612ad4565b600061222a8383612bed565b600061222a8383612c05565b606082471015612b66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b50565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612b8f9190613632565b60006040518083038185875af1925050503d8060008114612bcc576040519150601f19603f3d011682016040523d82523d6000602084013e612bd1565b606091505b5091509150612be287838387612c54565b979650505050505050565b6000818152600183016020526040812054151561222a565b6000818152600183016020526040812054612c4c575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556108b0565b5060006108b0565b60608315612cea578251600003612ce35773ffffffffffffffffffffffffffffffffffffffff85163b612ce3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b50565b50816123ee565b6123ee8383815115612cff5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b509190612f1d565b600060208284031215612d4557600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310612db6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b67ffffffffffffffff81168114611e9457600080fd5b60008083601f840112612de457600080fd5b50813567ffffffffffffffff811115612dfc57600080fd5b602083019150836020828501011115612e1457600080fd5b9250929050565b600080600060408486031215612e3057600080fd5b8335612e3b81612dbc565b9250602084013567ffffffffffffffff811115612e5757600080fd5b612e6386828701612dd2565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff81168114611e9457600080fd5b600060208284031215612ea457600080fd5b813561222a81612e70565b60005b83811015612eca578181015183820152602001612eb2565b50506000910152565b60008151808452612eeb816020860160208601612eaf565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061222a6020830184612ed3565b600060208284031215612f4257600080fd5b813561222a81612dbc565b8315158152606060208201526000612f686060830185612ed3565b8281036040840152612f7a8185612ed3565b9695505050505050565b60008060408385031215612f9757600080fd5b8235612fa281612e70565b946020939093013593505050565b600080600060608486031215612fc557600080fd5b8335612fd081612e70565b92506020840135612fe081612e70565b929592945050506040919091013590565b60008151808452602080850194506020840160005b83811015613043578151805173ffffffffffffffffffffffffffffffffffffffff1688528301518388015260409096019590820190600101613006565b509495945050505050565b602081528151602082015267ffffffffffffffff60208301511660408201526000604083015160a0606084015261308860c0840182612ed3565b905060608401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160808601526130c48383612ed3565b925060808601519150808584030160a0860152506130e28282612ff1565b95945050505050565b600080604083850312156130fe57600080fd5b82359150602083013561311081612e70565b809150509250929050565b60008083601f84011261312d57600080fd5b50813567ffffffffffffffff81111561314557600080fd5b6020830191508360208260051b8501011115612e1457600080fd5b6000806000806040858703121561317657600080fd5b843567ffffffffffffffff8082111561318e57600080fd5b61319a8883890161311b565b909650945060208701359150808211156131b357600080fd5b506131c08782880161311b565b95989497509550505050565b6000602082840312156131de57600080fd5b813567ffffffffffffffff8111156131f557600080fd5b820160a0818503121561222a57600080fd5b60008060008060006060868803121561321f57600080fd5b853561322a81612dbc565b9450602086013567ffffffffffffffff8082111561324757600080fd5b61325389838a01612dd2565b9096509450604088013591508082111561326c57600080fd5b5061327988828901612dd2565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156132dc576132dc61328a565b60405290565b6040516060810167ffffffffffffffff811182821017156132dc576132dc61328a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561334c5761334c61328a565b604052919050565b600067ffffffffffffffff82111561336e5761336e61328a565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f8301126133ab57600080fd5b81356133be6133b982613354565b613305565b8181528460208386010111156133d357600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561340557600080fd5b833561341081612dbc565b925060208481013567ffffffffffffffff8082111561342e57600080fd5b818701915087601f83011261344257600080fd5b8135818111156134545761345461328a565b613462848260051b01613305565b81815260069190911b8301840190848101908a83111561348157600080fd5b938501935b828510156134cd576040858c03121561349f5760008081fd5b6134a76132b9565b85356134b281612e70565b81528587013587820152825260409094019390850190613486565b9650505060408701359250808311156134e557600080fd5b50506134f38682870161339a565b9150509250925092565b8183823760009101908152919050565b600181811c9082168061352157607f821691505b60208210810361355a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126135c357600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261360257600080fd5b83018035915067ffffffffffffffff82111561361d57600080fd5b602001915036819003821315612e1457600080fd5b600082516135c3818460208701612eaf565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261367957600080fd5b830160208101925035905067ffffffffffffffff81111561369957600080fd5b803603821315612e1457600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8183526000602080850194508260005b8581101561304357813561371481612e70565b73ffffffffffffffffffffffffffffffffffffffff168752818301358388015260409687019690910190600101613701565b60208152813560208201526000602083013561376181612dbc565b67ffffffffffffffff808216604085015261377f6040860186613644565b925060a0606086015261379660c0860184836136a8565b9250506137a66060860186613644565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808786030160808801526137dc8583856136a8565b9450608088013592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe188360301831261381557600080fd5b6020928801928301923591508382111561382e57600080fd5b8160061b360383131561384057600080fd5b8685030160a0870152612be28482846136f1565b601f8211156108f5576000816000526020600020601f850160051c8101602086101561387d5750805b601f850160051c820191505b8181101561168e57828155600101613889565b67ffffffffffffffff8311156138b4576138b461328a565b6138c8836138c2835461350d565b83613854565b6000601f84116001811461391a57600085156138e45750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b1783556110f6565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156139695786850135825560209485019460019092019101613949565b50868210156139a4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81356139f081612e70565b73ffffffffffffffffffffffffffffffffffffffff81167fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825550602082013560018201555050565b68010000000000000000831115613a5657613a5661328a565b805483825580841015613ae35760017f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8083168314613a9757613a976139b6565b8086168614613aa857613aa86139b6565b5060008360005260206000208360011b81018760011b820191505b80821015613ade578282558284830155600282019150613ac3565b505050505b5060008181526020812083915b8581101561168e57613b0283836139e5565b6040929092019160029190910190600101613af0565b81358155600181016020830135613b2e81612dbc565b67ffffffffffffffff8082167fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000845416178355613b6e60408601866135cd565b93509150613b8083836002870161389c565b613b8d60608601866135cd565b93509150613b9f83836003870161389c565b608085013592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1853603018312613bd657600080fd5b918401918235915080821115613beb57600080fd5b506020820191508060061b3603821315613c0457600080fd5b612218818360048601613a3d565b600060208284031215613c2457600080fd5b813567ffffffffffffffff80821115613c3c57600080fd5b9083019060608286031215613c5057600080fd5b613c586132e2565b823582811115613c6757600080fd5b613c738782860161339a565b825250602083013582811115613c8857600080fd5b613c948782860161339a565b6020830152506040830135925060028310613cae57600080fd5b6040810192909252509392505050565b60008060408385031215613cd157600080fd5b825167ffffffffffffffff811115613ce857600080fd5b8301601f81018513613cf957600080fd5b8051613d076133b982613354565b818152866020838501011115613d1c57600080fd5b613d2d826020830160208601612eaf565b60209590950151949694955050505050565b67ffffffffffffffff83168152604060208201526000825160a06040840152613d6b60e0840182612ed3565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc080858403016060860152613da78383612ed3565b92506040860151915080858403016080860152613dc48383612ff1565b925073ffffffffffffffffffffffffffffffffffffffff60608701511660a086015260808601519150808584030160c086015250612f7a8282612ed3565b600060208284031215613e1457600080fd5b5051919050565b808201808211156108b0576108b06139b6565b604081526000613e416040830185612ed3565b90508260208301529392505050565b600060208284031215613e6257600080fd5b8151801515811461222a57600080fdfea164736f6c6343000818000a", +} + +var CCIPClientABI = CCIPClientMetaData.ABI + +var CCIPClientBin = CCIPClientMetaData.Bin + +func DeployCCIPClient(auth *bind.TransactOpts, backend bind.ContractBackend, router common.Address, feeToken common.Address) (common.Address, *types.Transaction, *CCIPClient, error) { + parsed, err := CCIPClientMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(CCIPClientBin), backend, router, feeToken) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &CCIPClient{address: address, abi: *parsed, CCIPClientCaller: CCIPClientCaller{contract: contract}, CCIPClientTransactor: CCIPClientTransactor{contract: contract}, CCIPClientFilterer: CCIPClientFilterer{contract: contract}}, nil +} + +type CCIPClient struct { + address common.Address + abi abi.ABI + CCIPClientCaller + CCIPClientTransactor + CCIPClientFilterer +} + +type CCIPClientCaller struct { + contract *bind.BoundContract +} + +type CCIPClientTransactor struct { + contract *bind.BoundContract +} + +type CCIPClientFilterer struct { + contract *bind.BoundContract +} + +type CCIPClientSession struct { + Contract *CCIPClient + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type CCIPClientCallerSession struct { + Contract *CCIPClientCaller + CallOpts bind.CallOpts +} + +type CCIPClientTransactorSession struct { + Contract *CCIPClientTransactor + TransactOpts bind.TransactOpts +} + +type CCIPClientRaw struct { + Contract *CCIPClient +} + +type CCIPClientCallerRaw struct { + Contract *CCIPClientCaller +} + +type CCIPClientTransactorRaw struct { + Contract *CCIPClientTransactor +} + +func NewCCIPClient(address common.Address, backend bind.ContractBackend) (*CCIPClient, error) { + abi, err := abi.JSON(strings.NewReader(CCIPClientABI)) + if err != nil { + return nil, err + } + contract, err := bindCCIPClient(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &CCIPClient{address: address, abi: abi, CCIPClientCaller: CCIPClientCaller{contract: contract}, CCIPClientTransactor: CCIPClientTransactor{contract: contract}, CCIPClientFilterer: CCIPClientFilterer{contract: contract}}, nil +} + +func NewCCIPClientCaller(address common.Address, caller bind.ContractCaller) (*CCIPClientCaller, error) { + contract, err := bindCCIPClient(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CCIPClientCaller{contract: contract}, nil +} + +func NewCCIPClientTransactor(address common.Address, transactor bind.ContractTransactor) (*CCIPClientTransactor, error) { + contract, err := bindCCIPClient(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CCIPClientTransactor{contract: contract}, nil +} + +func NewCCIPClientFilterer(address common.Address, filterer bind.ContractFilterer) (*CCIPClientFilterer, error) { + contract, err := bindCCIPClient(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CCIPClientFilterer{contract: contract}, nil +} + +func bindCCIPClient(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := CCIPClientMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_CCIPClient *CCIPClientRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CCIPClient.Contract.CCIPClientCaller.contract.Call(opts, result, method, params...) +} + +func (_CCIPClient *CCIPClientRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPClient.Contract.CCIPClientTransactor.contract.Transfer(opts) +} + +func (_CCIPClient *CCIPClientRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CCIPClient.Contract.CCIPClientTransactor.contract.Transact(opts, method, params...) +} + +func (_CCIPClient *CCIPClientCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CCIPClient.Contract.contract.Call(opts, result, method, params...) +} + +func (_CCIPClient *CCIPClientTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPClient.Contract.contract.Transfer(opts) +} + +func (_CCIPClient *CCIPClientTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CCIPClient.Contract.contract.Transact(opts, method, params...) +} + +func (_CCIPClient *CCIPClientCaller) ACKMESSAGEHEADER(opts *bind.CallOpts) ([]byte, error) { + var out []interface{} + err := _CCIPClient.contract.Call(opts, &out, "ACK_MESSAGE_HEADER") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_CCIPClient *CCIPClientSession) ACKMESSAGEHEADER() ([]byte, error) { + return _CCIPClient.Contract.ACKMESSAGEHEADER(&_CCIPClient.CallOpts) +} + +func (_CCIPClient *CCIPClientCallerSession) ACKMESSAGEHEADER() ([]byte, error) { + return _CCIPClient.Contract.ACKMESSAGEHEADER(&_CCIPClient.CallOpts) +} + +func (_CCIPClient *CCIPClientCaller) GetMessageContents(opts *bind.CallOpts, messageId [32]byte) (ClientAny2EVMMessage, error) { + var out []interface{} + err := _CCIPClient.contract.Call(opts, &out, "getMessageContents", messageId) + + if err != nil { + return *new(ClientAny2EVMMessage), err + } + + out0 := *abi.ConvertType(out[0], new(ClientAny2EVMMessage)).(*ClientAny2EVMMessage) + + return out0, err + +} + +func (_CCIPClient *CCIPClientSession) GetMessageContents(messageId [32]byte) (ClientAny2EVMMessage, error) { + return _CCIPClient.Contract.GetMessageContents(&_CCIPClient.CallOpts, messageId) +} + +func (_CCIPClient *CCIPClientCallerSession) GetMessageContents(messageId [32]byte) (ClientAny2EVMMessage, error) { + return _CCIPClient.Contract.GetMessageContents(&_CCIPClient.CallOpts, messageId) +} + +func (_CCIPClient *CCIPClientCaller) GetMessageStatus(opts *bind.CallOpts, messageId [32]byte) (*big.Int, error) { + var out []interface{} + err := _CCIPClient.contract.Call(opts, &out, "getMessageStatus", messageId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_CCIPClient *CCIPClientSession) GetMessageStatus(messageId [32]byte) (*big.Int, error) { + return _CCIPClient.Contract.GetMessageStatus(&_CCIPClient.CallOpts, messageId) +} + +func (_CCIPClient *CCIPClientCallerSession) GetMessageStatus(messageId [32]byte) (*big.Int, error) { + return _CCIPClient.Contract.GetMessageStatus(&_CCIPClient.CallOpts, messageId) +} + +func (_CCIPClient *CCIPClientCaller) GetRouter(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CCIPClient.contract.Call(opts, &out, "getRouter") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_CCIPClient *CCIPClientSession) GetRouter() (common.Address, error) { + return _CCIPClient.Contract.GetRouter(&_CCIPClient.CallOpts) +} + +func (_CCIPClient *CCIPClientCallerSession) GetRouter() (common.Address, error) { + return _CCIPClient.Contract.GetRouter(&_CCIPClient.CallOpts) +} + +func (_CCIPClient *CCIPClientCaller) IsApprovedSender(opts *bind.CallOpts, sourceChainSelector uint64, senderAddr []byte) (bool, error) { + var out []interface{} + err := _CCIPClient.contract.Call(opts, &out, "isApprovedSender", sourceChainSelector, senderAddr) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_CCIPClient *CCIPClientSession) IsApprovedSender(sourceChainSelector uint64, senderAddr []byte) (bool, error) { + return _CCIPClient.Contract.IsApprovedSender(&_CCIPClient.CallOpts, sourceChainSelector, senderAddr) +} + +func (_CCIPClient *CCIPClientCallerSession) IsApprovedSender(sourceChainSelector uint64, senderAddr []byte) (bool, error) { + return _CCIPClient.Contract.IsApprovedSender(&_CCIPClient.CallOpts, sourceChainSelector, senderAddr) +} + +func (_CCIPClient *CCIPClientCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CCIPClient.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_CCIPClient *CCIPClientSession) Owner() (common.Address, error) { + return _CCIPClient.Contract.Owner(&_CCIPClient.CallOpts) +} + +func (_CCIPClient *CCIPClientCallerSession) Owner() (common.Address, error) { + return _CCIPClient.Contract.Owner(&_CCIPClient.CallOpts) +} + +func (_CCIPClient *CCIPClientCaller) SChainConfigs(opts *bind.CallOpts, arg0 uint64) (SChainConfigs, + + error) { + var out []interface{} + err := _CCIPClient.contract.Call(opts, &out, "s_chainConfigs", arg0) + + outstruct := new(SChainConfigs) + if err != nil { + return *outstruct, err + } + + outstruct.Disabled = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.Recipient = *abi.ConvertType(out[1], new([]byte)).(*[]byte) + outstruct.ExtraArgsBytes = *abi.ConvertType(out[2], new([]byte)).(*[]byte) + + return *outstruct, err + +} + +func (_CCIPClient *CCIPClientSession) SChainConfigs(arg0 uint64) (SChainConfigs, + + error) { + return _CCIPClient.Contract.SChainConfigs(&_CCIPClient.CallOpts, arg0) +} + +func (_CCIPClient *CCIPClientCallerSession) SChainConfigs(arg0 uint64) (SChainConfigs, + + error) { + return _CCIPClient.Contract.SChainConfigs(&_CCIPClient.CallOpts, arg0) +} + +func (_CCIPClient *CCIPClientCaller) SFeeToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CCIPClient.contract.Call(opts, &out, "s_feeToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_CCIPClient *CCIPClientSession) SFeeToken() (common.Address, error) { + return _CCIPClient.Contract.SFeeToken(&_CCIPClient.CallOpts) +} + +func (_CCIPClient *CCIPClientCallerSession) SFeeToken() (common.Address, error) { + return _CCIPClient.Contract.SFeeToken(&_CCIPClient.CallOpts) +} + +func (_CCIPClient *CCIPClientCaller) SMessageStatus(opts *bind.CallOpts, messageId [32]byte) (uint8, error) { + var out []interface{} + err := _CCIPClient.contract.Call(opts, &out, "s_messageStatus", messageId) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_CCIPClient *CCIPClientSession) SMessageStatus(messageId [32]byte) (uint8, error) { + return _CCIPClient.Contract.SMessageStatus(&_CCIPClient.CallOpts, messageId) +} + +func (_CCIPClient *CCIPClientCallerSession) SMessageStatus(messageId [32]byte) (uint8, error) { + return _CCIPClient.Contract.SMessageStatus(&_CCIPClient.CallOpts, messageId) +} + +func (_CCIPClient *CCIPClientCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _CCIPClient.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_CCIPClient *CCIPClientSession) TypeAndVersion() (string, error) { + return _CCIPClient.Contract.TypeAndVersion(&_CCIPClient.CallOpts) +} + +func (_CCIPClient *CCIPClientCallerSession) TypeAndVersion() (string, error) { + return _CCIPClient.Contract.TypeAndVersion(&_CCIPClient.CallOpts) +} + +func (_CCIPClient *CCIPClientTransactor) AbandonFailedMessage(opts *bind.TransactOpts, messageId [32]byte, receiver common.Address) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "abandonFailedMessage", messageId, receiver) +} + +func (_CCIPClient *CCIPClientSession) AbandonFailedMessage(messageId [32]byte, receiver common.Address) (*types.Transaction, error) { + return _CCIPClient.Contract.AbandonFailedMessage(&_CCIPClient.TransactOpts, messageId, receiver) +} + +func (_CCIPClient *CCIPClientTransactorSession) AbandonFailedMessage(messageId [32]byte, receiver common.Address) (*types.Transaction, error) { + return _CCIPClient.Contract.AbandonFailedMessage(&_CCIPClient.TransactOpts, messageId, receiver) +} + +func (_CCIPClient *CCIPClientTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "acceptOwnership") +} + +func (_CCIPClient *CCIPClientSession) AcceptOwnership() (*types.Transaction, error) { + return _CCIPClient.Contract.AcceptOwnership(&_CCIPClient.TransactOpts) +} + +func (_CCIPClient *CCIPClientTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _CCIPClient.Contract.AcceptOwnership(&_CCIPClient.TransactOpts) +} + +func (_CCIPClient *CCIPClientTransactor) CcipReceive(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "ccipReceive", message) +} + +func (_CCIPClient *CCIPClientSession) CcipReceive(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPClient.Contract.CcipReceive(&_CCIPClient.TransactOpts, message) +} + +func (_CCIPClient *CCIPClientTransactorSession) CcipReceive(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPClient.Contract.CcipReceive(&_CCIPClient.TransactOpts, message) +} + +func (_CCIPClient *CCIPClientTransactor) CcipSend(opts *bind.TransactOpts, destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "ccipSend", destChainSelector, tokenAmounts, data) +} + +func (_CCIPClient *CCIPClientSession) CcipSend(destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte) (*types.Transaction, error) { + return _CCIPClient.Contract.CcipSend(&_CCIPClient.TransactOpts, destChainSelector, tokenAmounts, data) +} + +func (_CCIPClient *CCIPClientTransactorSession) CcipSend(destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte) (*types.Transaction, error) { + return _CCIPClient.Contract.CcipSend(&_CCIPClient.TransactOpts, destChainSelector, tokenAmounts, data) +} + +func (_CCIPClient *CCIPClientTransactor) DisableChain(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "disableChain", chainSelector) +} + +func (_CCIPClient *CCIPClientSession) DisableChain(chainSelector uint64) (*types.Transaction, error) { + return _CCIPClient.Contract.DisableChain(&_CCIPClient.TransactOpts, chainSelector) +} + +func (_CCIPClient *CCIPClientTransactorSession) DisableChain(chainSelector uint64) (*types.Transaction, error) { + return _CCIPClient.Contract.DisableChain(&_CCIPClient.TransactOpts, chainSelector) +} + +func (_CCIPClient *CCIPClientTransactor) EnableChain(opts *bind.TransactOpts, chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "enableChain", chainSelector, recipient, _extraArgsBytes) +} + +func (_CCIPClient *CCIPClientSession) EnableChain(chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _CCIPClient.Contract.EnableChain(&_CCIPClient.TransactOpts, chainSelector, recipient, _extraArgsBytes) +} + +func (_CCIPClient *CCIPClientTransactorSession) EnableChain(chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _CCIPClient.Contract.EnableChain(&_CCIPClient.TransactOpts, chainSelector, recipient, _extraArgsBytes) +} + +func (_CCIPClient *CCIPClientTransactor) ModifyFeeToken(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "modifyFeeToken", token) +} + +func (_CCIPClient *CCIPClientSession) ModifyFeeToken(token common.Address) (*types.Transaction, error) { + return _CCIPClient.Contract.ModifyFeeToken(&_CCIPClient.TransactOpts, token) +} + +func (_CCIPClient *CCIPClientTransactorSession) ModifyFeeToken(token common.Address) (*types.Transaction, error) { + return _CCIPClient.Contract.ModifyFeeToken(&_CCIPClient.TransactOpts, token) +} + +func (_CCIPClient *CCIPClientTransactor) ProcessMessage(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "processMessage", message) +} + +func (_CCIPClient *CCIPClientSession) ProcessMessage(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPClient.Contract.ProcessMessage(&_CCIPClient.TransactOpts, message) +} + +func (_CCIPClient *CCIPClientTransactorSession) ProcessMessage(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPClient.Contract.ProcessMessage(&_CCIPClient.TransactOpts, message) +} + +func (_CCIPClient *CCIPClientTransactor) RetryFailedMessage(opts *bind.TransactOpts, messageId [32]byte) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "retryFailedMessage", messageId) +} + +func (_CCIPClient *CCIPClientSession) RetryFailedMessage(messageId [32]byte) (*types.Transaction, error) { + return _CCIPClient.Contract.RetryFailedMessage(&_CCIPClient.TransactOpts, messageId) +} + +func (_CCIPClient *CCIPClientTransactorSession) RetryFailedMessage(messageId [32]byte) (*types.Transaction, error) { + return _CCIPClient.Contract.RetryFailedMessage(&_CCIPClient.TransactOpts, messageId) +} + +func (_CCIPClient *CCIPClientTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "transferOwnership", to) +} + +func (_CCIPClient *CCIPClientSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CCIPClient.Contract.TransferOwnership(&_CCIPClient.TransactOpts, to) +} + +func (_CCIPClient *CCIPClientTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CCIPClient.Contract.TransferOwnership(&_CCIPClient.TransactOpts, to) +} + +func (_CCIPClient *CCIPClientTransactor) UpdateApprovedSenders(opts *bind.TransactOpts, adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "updateApprovedSenders", adds, removes) +} + +func (_CCIPClient *CCIPClientSession) UpdateApprovedSenders(adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _CCIPClient.Contract.UpdateApprovedSenders(&_CCIPClient.TransactOpts, adds, removes) +} + +func (_CCIPClient *CCIPClientTransactorSession) UpdateApprovedSenders(adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _CCIPClient.Contract.UpdateApprovedSenders(&_CCIPClient.TransactOpts, adds, removes) +} + +func (_CCIPClient *CCIPClientTransactor) WithdrawNativeToken(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "withdrawNativeToken", to, amount) +} + +func (_CCIPClient *CCIPClientSession) WithdrawNativeToken(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPClient.Contract.WithdrawNativeToken(&_CCIPClient.TransactOpts, to, amount) +} + +func (_CCIPClient *CCIPClientTransactorSession) WithdrawNativeToken(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPClient.Contract.WithdrawNativeToken(&_CCIPClient.TransactOpts, to, amount) +} + +func (_CCIPClient *CCIPClientTransactor) WithdrawTokens(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPClient.contract.Transact(opts, "withdrawTokens", token, to, amount) +} + +func (_CCIPClient *CCIPClientSession) WithdrawTokens(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPClient.Contract.WithdrawTokens(&_CCIPClient.TransactOpts, token, to, amount) +} + +func (_CCIPClient *CCIPClientTransactorSession) WithdrawTokens(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPClient.Contract.WithdrawTokens(&_CCIPClient.TransactOpts, token, to, amount) +} + +func (_CCIPClient *CCIPClientTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPClient.contract.RawTransact(opts, nil) +} + +func (_CCIPClient *CCIPClientSession) Receive() (*types.Transaction, error) { + return _CCIPClient.Contract.Receive(&_CCIPClient.TransactOpts) +} + +func (_CCIPClient *CCIPClientTransactorSession) Receive() (*types.Transaction, error) { + return _CCIPClient.Contract.Receive(&_CCIPClient.TransactOpts) +} + +type CCIPClientFeeTokenModifiedIterator struct { + Event *CCIPClientFeeTokenModified + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPClientFeeTokenModifiedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPClientFeeTokenModified) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPClientFeeTokenModified) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPClientFeeTokenModifiedIterator) Error() error { + return it.fail +} + +func (it *CCIPClientFeeTokenModifiedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPClientFeeTokenModified struct { + OldToken common.Address + NewToken common.Address + Raw types.Log +} + +func (_CCIPClient *CCIPClientFilterer) FilterFeeTokenModified(opts *bind.FilterOpts, oldToken []common.Address, newToken []common.Address) (*CCIPClientFeeTokenModifiedIterator, error) { + + var oldTokenRule []interface{} + for _, oldTokenItem := range oldToken { + oldTokenRule = append(oldTokenRule, oldTokenItem) + } + var newTokenRule []interface{} + for _, newTokenItem := range newToken { + newTokenRule = append(newTokenRule, newTokenItem) + } + + logs, sub, err := _CCIPClient.contract.FilterLogs(opts, "FeeTokenModified", oldTokenRule, newTokenRule) + if err != nil { + return nil, err + } + return &CCIPClientFeeTokenModifiedIterator{contract: _CCIPClient.contract, event: "FeeTokenModified", logs: logs, sub: sub}, nil +} + +func (_CCIPClient *CCIPClientFilterer) WatchFeeTokenModified(opts *bind.WatchOpts, sink chan<- *CCIPClientFeeTokenModified, oldToken []common.Address, newToken []common.Address) (event.Subscription, error) { + + var oldTokenRule []interface{} + for _, oldTokenItem := range oldToken { + oldTokenRule = append(oldTokenRule, oldTokenItem) + } + var newTokenRule []interface{} + for _, newTokenItem := range newToken { + newTokenRule = append(newTokenRule, newTokenItem) + } + + logs, sub, err := _CCIPClient.contract.WatchLogs(opts, "FeeTokenModified", oldTokenRule, newTokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPClientFeeTokenModified) + if err := _CCIPClient.contract.UnpackLog(event, "FeeTokenModified", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPClient *CCIPClientFilterer) ParseFeeTokenModified(log types.Log) (*CCIPClientFeeTokenModified, error) { + event := new(CCIPClientFeeTokenModified) + if err := _CCIPClient.contract.UnpackLog(event, "FeeTokenModified", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPClientMessageAbandonedIterator struct { + Event *CCIPClientMessageAbandoned + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPClientMessageAbandonedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageAbandoned) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageAbandoned) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPClientMessageAbandonedIterator) Error() error { + return it.fail +} + +func (it *CCIPClientMessageAbandonedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPClientMessageAbandoned struct { + MessageId [32]byte + TokenReceiver common.Address + Raw types.Log +} + +func (_CCIPClient *CCIPClientFilterer) FilterMessageAbandoned(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPClientMessageAbandonedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPClient.contract.FilterLogs(opts, "MessageAbandoned", messageIdRule) + if err != nil { + return nil, err + } + return &CCIPClientMessageAbandonedIterator{contract: _CCIPClient.contract, event: "MessageAbandoned", logs: logs, sub: sub}, nil +} + +func (_CCIPClient *CCIPClientFilterer) WatchMessageAbandoned(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageAbandoned, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPClient.contract.WatchLogs(opts, "MessageAbandoned", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPClientMessageAbandoned) + if err := _CCIPClient.contract.UnpackLog(event, "MessageAbandoned", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPClient *CCIPClientFilterer) ParseMessageAbandoned(log types.Log) (*CCIPClientMessageAbandoned, error) { + event := new(CCIPClientMessageAbandoned) + if err := _CCIPClient.contract.UnpackLog(event, "MessageAbandoned", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPClientMessageAckReceivedIterator struct { + Event *CCIPClientMessageAckReceived + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPClientMessageAckReceivedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageAckReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageAckReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPClientMessageAckReceivedIterator) Error() error { + return it.fail +} + +func (it *CCIPClientMessageAckReceivedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPClientMessageAckReceived struct { + Arg0 [32]byte + Raw types.Log +} + +func (_CCIPClient *CCIPClientFilterer) FilterMessageAckReceived(opts *bind.FilterOpts) (*CCIPClientMessageAckReceivedIterator, error) { + + logs, sub, err := _CCIPClient.contract.FilterLogs(opts, "MessageAckReceived") + if err != nil { + return nil, err + } + return &CCIPClientMessageAckReceivedIterator{contract: _CCIPClient.contract, event: "MessageAckReceived", logs: logs, sub: sub}, nil +} + +func (_CCIPClient *CCIPClientFilterer) WatchMessageAckReceived(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageAckReceived) (event.Subscription, error) { + + logs, sub, err := _CCIPClient.contract.WatchLogs(opts, "MessageAckReceived") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPClientMessageAckReceived) + if err := _CCIPClient.contract.UnpackLog(event, "MessageAckReceived", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPClient *CCIPClientFilterer) ParseMessageAckReceived(log types.Log) (*CCIPClientMessageAckReceived, error) { + event := new(CCIPClientMessageAckReceived) + if err := _CCIPClient.contract.UnpackLog(event, "MessageAckReceived", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPClientMessageAckSentIterator struct { + Event *CCIPClientMessageAckSent + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPClientMessageAckSentIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageAckSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageAckSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPClientMessageAckSentIterator) Error() error { + return it.fail +} + +func (it *CCIPClientMessageAckSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPClientMessageAckSent struct { + IncomingMessageId [32]byte + Raw types.Log +} + +func (_CCIPClient *CCIPClientFilterer) FilterMessageAckSent(opts *bind.FilterOpts) (*CCIPClientMessageAckSentIterator, error) { + + logs, sub, err := _CCIPClient.contract.FilterLogs(opts, "MessageAckSent") + if err != nil { + return nil, err + } + return &CCIPClientMessageAckSentIterator{contract: _CCIPClient.contract, event: "MessageAckSent", logs: logs, sub: sub}, nil +} + +func (_CCIPClient *CCIPClientFilterer) WatchMessageAckSent(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageAckSent) (event.Subscription, error) { + + logs, sub, err := _CCIPClient.contract.WatchLogs(opts, "MessageAckSent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPClientMessageAckSent) + if err := _CCIPClient.contract.UnpackLog(event, "MessageAckSent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPClient *CCIPClientFilterer) ParseMessageAckSent(log types.Log) (*CCIPClientMessageAckSent, error) { + event := new(CCIPClientMessageAckSent) + if err := _CCIPClient.contract.UnpackLog(event, "MessageAckSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPClientMessageFailedIterator struct { + Event *CCIPClientMessageFailed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPClientMessageFailedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageFailed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageFailed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPClientMessageFailedIterator) Error() error { + return it.fail +} + +func (it *CCIPClientMessageFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPClientMessageFailed struct { + MessageId [32]byte + Reason []byte + Raw types.Log +} + +func (_CCIPClient *CCIPClientFilterer) FilterMessageFailed(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPClientMessageFailedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPClient.contract.FilterLogs(opts, "MessageFailed", messageIdRule) + if err != nil { + return nil, err + } + return &CCIPClientMessageFailedIterator{contract: _CCIPClient.contract, event: "MessageFailed", logs: logs, sub: sub}, nil +} + +func (_CCIPClient *CCIPClientFilterer) WatchMessageFailed(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageFailed, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPClient.contract.WatchLogs(opts, "MessageFailed", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPClientMessageFailed) + if err := _CCIPClient.contract.UnpackLog(event, "MessageFailed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPClient *CCIPClientFilterer) ParseMessageFailed(log types.Log) (*CCIPClientMessageFailed, error) { + event := new(CCIPClientMessageFailed) + if err := _CCIPClient.contract.UnpackLog(event, "MessageFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPClientMessageRecoveredIterator struct { + Event *CCIPClientMessageRecovered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPClientMessageRecoveredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageRecovered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageRecovered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPClientMessageRecoveredIterator) Error() error { + return it.fail +} + +func (it *CCIPClientMessageRecoveredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPClientMessageRecovered struct { + MessageId [32]byte + Raw types.Log +} + +func (_CCIPClient *CCIPClientFilterer) FilterMessageRecovered(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPClientMessageRecoveredIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPClient.contract.FilterLogs(opts, "MessageRecovered", messageIdRule) + if err != nil { + return nil, err + } + return &CCIPClientMessageRecoveredIterator{contract: _CCIPClient.contract, event: "MessageRecovered", logs: logs, sub: sub}, nil +} + +func (_CCIPClient *CCIPClientFilterer) WatchMessageRecovered(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageRecovered, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPClient.contract.WatchLogs(opts, "MessageRecovered", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPClientMessageRecovered) + if err := _CCIPClient.contract.UnpackLog(event, "MessageRecovered", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPClient *CCIPClientFilterer) ParseMessageRecovered(log types.Log) (*CCIPClientMessageRecovered, error) { + event := new(CCIPClientMessageRecovered) + if err := _CCIPClient.contract.UnpackLog(event, "MessageRecovered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPClientMessageSentIterator struct { + Event *CCIPClientMessageSent + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPClientMessageSentIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPClientMessageSentIterator) Error() error { + return it.fail +} + +func (it *CCIPClientMessageSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPClientMessageSent struct { + IncomingMessageId [32]byte + ACKMessageId [32]byte + Raw types.Log +} + +func (_CCIPClient *CCIPClientFilterer) FilterMessageSent(opts *bind.FilterOpts, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (*CCIPClientMessageSentIterator, error) { + + var incomingMessageIdRule []interface{} + for _, incomingMessageIdItem := range incomingMessageId { + incomingMessageIdRule = append(incomingMessageIdRule, incomingMessageIdItem) + } + var ACKMessageIdRule []interface{} + for _, ACKMessageIdItem := range ACKMessageId { + ACKMessageIdRule = append(ACKMessageIdRule, ACKMessageIdItem) + } + + logs, sub, err := _CCIPClient.contract.FilterLogs(opts, "MessageSent", incomingMessageIdRule, ACKMessageIdRule) + if err != nil { + return nil, err + } + return &CCIPClientMessageSentIterator{contract: _CCIPClient.contract, event: "MessageSent", logs: logs, sub: sub}, nil +} + +func (_CCIPClient *CCIPClientFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageSent, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (event.Subscription, error) { + + var incomingMessageIdRule []interface{} + for _, incomingMessageIdItem := range incomingMessageId { + incomingMessageIdRule = append(incomingMessageIdRule, incomingMessageIdItem) + } + var ACKMessageIdRule []interface{} + for _, ACKMessageIdItem := range ACKMessageId { + ACKMessageIdRule = append(ACKMessageIdRule, ACKMessageIdItem) + } + + logs, sub, err := _CCIPClient.contract.WatchLogs(opts, "MessageSent", incomingMessageIdRule, ACKMessageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPClientMessageSent) + if err := _CCIPClient.contract.UnpackLog(event, "MessageSent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPClient *CCIPClientFilterer) ParseMessageSent(log types.Log) (*CCIPClientMessageSent, error) { + event := new(CCIPClientMessageSent) + if err := _CCIPClient.contract.UnpackLog(event, "MessageSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPClientMessageSucceededIterator struct { + Event *CCIPClientMessageSucceeded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPClientMessageSucceededIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageSucceeded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPClientMessageSucceeded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPClientMessageSucceededIterator) Error() error { + return it.fail +} + +func (it *CCIPClientMessageSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPClientMessageSucceeded struct { + MessageId [32]byte + Raw types.Log +} + +func (_CCIPClient *CCIPClientFilterer) FilterMessageSucceeded(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPClientMessageSucceededIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPClient.contract.FilterLogs(opts, "MessageSucceeded", messageIdRule) + if err != nil { + return nil, err + } + return &CCIPClientMessageSucceededIterator{contract: _CCIPClient.contract, event: "MessageSucceeded", logs: logs, sub: sub}, nil +} + +func (_CCIPClient *CCIPClientFilterer) WatchMessageSucceeded(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageSucceeded, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPClient.contract.WatchLogs(opts, "MessageSucceeded", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPClientMessageSucceeded) + if err := _CCIPClient.contract.UnpackLog(event, "MessageSucceeded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPClient *CCIPClientFilterer) ParseMessageSucceeded(log types.Log) (*CCIPClientMessageSucceeded, error) { + event := new(CCIPClientMessageSucceeded) + if err := _CCIPClient.contract.UnpackLog(event, "MessageSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPClientOwnershipTransferRequestedIterator struct { + Event *CCIPClientOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPClientOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPClientOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPClientOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPClientOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *CCIPClientOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPClientOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_CCIPClient *CCIPClientFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPClientOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPClient.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &CCIPClientOwnershipTransferRequestedIterator{contract: _CCIPClient.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_CCIPClient *CCIPClientFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPClientOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPClient.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPClientOwnershipTransferRequested) + if err := _CCIPClient.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPClient *CCIPClientFilterer) ParseOwnershipTransferRequested(log types.Log) (*CCIPClientOwnershipTransferRequested, error) { + event := new(CCIPClientOwnershipTransferRequested) + if err := _CCIPClient.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPClientOwnershipTransferredIterator struct { + Event *CCIPClientOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPClientOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPClientOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPClientOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPClientOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *CCIPClientOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPClientOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_CCIPClient *CCIPClientFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPClientOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPClient.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &CCIPClientOwnershipTransferredIterator{contract: _CCIPClient.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_CCIPClient *CCIPClientFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPClientOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPClient.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPClientOwnershipTransferred) + if err := _CCIPClient.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPClient *CCIPClientFilterer) ParseOwnershipTransferred(log types.Log) (*CCIPClientOwnershipTransferred, error) { + event := new(CCIPClientOwnershipTransferred) + if err := _CCIPClient.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type SChainConfigs struct { + Disabled bool + Recipient []byte + ExtraArgsBytes []byte +} + +func (_CCIPClient *CCIPClient) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _CCIPClient.abi.Events["FeeTokenModified"].ID: + return _CCIPClient.ParseFeeTokenModified(log) + case _CCIPClient.abi.Events["MessageAbandoned"].ID: + return _CCIPClient.ParseMessageAbandoned(log) + case _CCIPClient.abi.Events["MessageAckReceived"].ID: + return _CCIPClient.ParseMessageAckReceived(log) + case _CCIPClient.abi.Events["MessageAckSent"].ID: + return _CCIPClient.ParseMessageAckSent(log) + case _CCIPClient.abi.Events["MessageFailed"].ID: + return _CCIPClient.ParseMessageFailed(log) + case _CCIPClient.abi.Events["MessageRecovered"].ID: + return _CCIPClient.ParseMessageRecovered(log) + case _CCIPClient.abi.Events["MessageSent"].ID: + return _CCIPClient.ParseMessageSent(log) + case _CCIPClient.abi.Events["MessageSucceeded"].ID: + return _CCIPClient.ParseMessageSucceeded(log) + case _CCIPClient.abi.Events["OwnershipTransferRequested"].ID: + return _CCIPClient.ParseOwnershipTransferRequested(log) + case _CCIPClient.abi.Events["OwnershipTransferred"].ID: + return _CCIPClient.ParseOwnershipTransferred(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (CCIPClientFeeTokenModified) Topic() common.Hash { + return common.HexToHash("0x4a1cb6b940121ea2ba30fb9b494035cbfe2d4b6b080db8b502150410bef7eb4e") +} + +func (CCIPClientMessageAbandoned) Topic() common.Hash { + return common.HexToHash("0xd5038100bd3dc9631d3c3f4f61a3e53e9d466f40c47af9897292c7b35e32a957") +} + +func (CCIPClientMessageAckReceived) Topic() common.Hash { + return common.HexToHash("0xef0cb160d3dc564cde61ae97d9981f9c4d92ace727a2ec202b18b223ea832a79") +} + +func (CCIPClientMessageAckSent) Topic() common.Hash { + return common.HexToHash("0x75944f95ba0be568cb30faeb0ef135cb73d07006939da29722d670a97f5c5b26") +} + +func (CCIPClientMessageFailed) Topic() common.Hash { + return common.HexToHash("0x55bc02a9ef6f146737edeeb425738006f67f077e7138de3bf84a15bde1a5b56f") +} + +func (CCIPClientMessageRecovered) Topic() common.Hash { + return common.HexToHash("0xef3bf8c64bc480286c4f3503b870ceb23e648d2d902e31fb7bb46680da6de8ad") +} + +func (CCIPClientMessageSent) Topic() common.Hash { + return common.HexToHash("0x9102b9031c3c59d8320bf14d84d7d7a3434366b91032fad1c87579cfc62b2372") +} + +func (CCIPClientMessageSucceeded) Topic() common.Hash { + return common.HexToHash("0xdf6958669026659bac75ba986685e11a7d271284989f565f2802522663e9a70f") +} + +func (CCIPClientOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (CCIPClientOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (_CCIPClient *CCIPClient) Address() common.Address { + return _CCIPClient.address +} + +type CCIPClientInterface interface { + ACKMESSAGEHEADER(opts *bind.CallOpts) ([]byte, error) + + GetMessageContents(opts *bind.CallOpts, messageId [32]byte) (ClientAny2EVMMessage, error) + + GetMessageStatus(opts *bind.CallOpts, messageId [32]byte) (*big.Int, error) + + GetRouter(opts *bind.CallOpts) (common.Address, error) + + IsApprovedSender(opts *bind.CallOpts, sourceChainSelector uint64, senderAddr []byte) (bool, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + SChainConfigs(opts *bind.CallOpts, arg0 uint64) (SChainConfigs, + + error) + + SFeeToken(opts *bind.CallOpts) (common.Address, error) + + SMessageStatus(opts *bind.CallOpts, messageId [32]byte) (uint8, error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AbandonFailedMessage(opts *bind.TransactOpts, messageId [32]byte, receiver common.Address) (*types.Transaction, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + CcipReceive(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) + + CcipSend(opts *bind.TransactOpts, destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte) (*types.Transaction, error) + + DisableChain(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) + + EnableChain(opts *bind.TransactOpts, chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) + + ModifyFeeToken(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) + + ProcessMessage(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) + + RetryFailedMessage(opts *bind.TransactOpts, messageId [32]byte) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + UpdateApprovedSenders(opts *bind.TransactOpts, adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) + + WithdrawNativeToken(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) + + WithdrawTokens(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) + + Receive(opts *bind.TransactOpts) (*types.Transaction, error) + + FilterFeeTokenModified(opts *bind.FilterOpts, oldToken []common.Address, newToken []common.Address) (*CCIPClientFeeTokenModifiedIterator, error) + + WatchFeeTokenModified(opts *bind.WatchOpts, sink chan<- *CCIPClientFeeTokenModified, oldToken []common.Address, newToken []common.Address) (event.Subscription, error) + + ParseFeeTokenModified(log types.Log) (*CCIPClientFeeTokenModified, error) + + FilterMessageAbandoned(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPClientMessageAbandonedIterator, error) + + WatchMessageAbandoned(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageAbandoned, messageId [][32]byte) (event.Subscription, error) + + ParseMessageAbandoned(log types.Log) (*CCIPClientMessageAbandoned, error) + + FilterMessageAckReceived(opts *bind.FilterOpts) (*CCIPClientMessageAckReceivedIterator, error) + + WatchMessageAckReceived(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageAckReceived) (event.Subscription, error) + + ParseMessageAckReceived(log types.Log) (*CCIPClientMessageAckReceived, error) + + FilterMessageAckSent(opts *bind.FilterOpts) (*CCIPClientMessageAckSentIterator, error) + + WatchMessageAckSent(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageAckSent) (event.Subscription, error) + + ParseMessageAckSent(log types.Log) (*CCIPClientMessageAckSent, error) + + FilterMessageFailed(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPClientMessageFailedIterator, error) + + WatchMessageFailed(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageFailed, messageId [][32]byte) (event.Subscription, error) + + ParseMessageFailed(log types.Log) (*CCIPClientMessageFailed, error) + + FilterMessageRecovered(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPClientMessageRecoveredIterator, error) + + WatchMessageRecovered(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageRecovered, messageId [][32]byte) (event.Subscription, error) + + ParseMessageRecovered(log types.Log) (*CCIPClientMessageRecovered, error) + + FilterMessageSent(opts *bind.FilterOpts, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (*CCIPClientMessageSentIterator, error) + + WatchMessageSent(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageSent, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (event.Subscription, error) + + ParseMessageSent(log types.Log) (*CCIPClientMessageSent, error) + + FilterMessageSucceeded(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPClientMessageSucceededIterator, error) + + WatchMessageSucceeded(opts *bind.WatchOpts, sink chan<- *CCIPClientMessageSucceeded, messageId [][32]byte) (event.Subscription, error) + + ParseMessageSucceeded(log types.Log) (*CCIPClientMessageSucceeded, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPClientOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPClientOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*CCIPClientOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPClientOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPClientOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*CCIPClientOwnershipTransferred, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/ccip/generated/ccipReceiver/ccipReceiver.go b/core/gethwrappers/ccip/generated/ccipReceiver/ccipReceiver.go new file mode 100644 index 0000000000..a7920aa1ff --- /dev/null +++ b/core/gethwrappers/ccip/generated/ccipReceiver/ccipReceiver.go @@ -0,0 +1,1415 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ccipReceiver + +import ( + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +type CCIPClientBaseApprovedSenderUpdate struct { + DestChainSelector uint64 + Sender []byte +} + +type ClientAny2EVMMessage struct { + MessageId [32]byte + SourceChainSelector uint64 + Sender []byte + Data []byte + DestTokenAmounts []ClientEVMTokenAmount +} + +type ClientEVMTokenAmount struct { + Token common.Address + Amount *big.Int +} + +var CCIPReceiverMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidChain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"}],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"InvalidRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"name\":\"InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageNotFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySelf\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenReceiver\",\"type\":\"address\"}],\"name\":\"MessageAbandoned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageRecovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"abandonFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"ccipReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"disableChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_extraArgsBytes\",\"type\":\"bytes\"}],\"name\":\"enableChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"getMessageContents\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"getMessageStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"senderAddr\",\"type\":\"bytes\"}],\"name\":\"isApprovedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"processMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"retryFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"s_chainConfigs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraArgsBytes\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPClientBase.ApprovedSenderUpdate[]\",\"name\":\"adds\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPClientBase.ApprovedSenderUpdate[]\",\"name\":\"removes\",\"type\":\"tuple[]\"}],\"name\":\"updateApprovedSenders\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawNativeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60a06040523480156200001157600080fd5b5060405162002a7e38038062002a7e8339810160408190526200003491620001a8565b8033806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620000fd565b5050506001600160a01b038116620000ea576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b031660805250620001da565b336001600160a01b03821603620001575760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620001bb57600080fd5b81516001600160a01b0381168114620001d357600080fd5b9392505050565b608051612881620001fd600039600081816103760152610e5901526128816000f3fe60806040526004361061012d5760003560e01c806379ba5097116100a5578063b0f479a111610074578063d8469e4011610059578063d8469e40146103ba578063e4ca8754146103da578063f2fde38b146103fa57600080fd5b8063b0f479a114610367578063cf6730f81461039a57600080fd5b806379ba5097146102c65780638462a2b9146102db57806385572ffb146102fb5780638da5cb5b1461031b57600080fd5b80635075a9d4116100fc5780635e35359e116100e15780635e35359e146102595780636939cd97146102795780636d62d633146102a657600080fd5b80635075a9d41461020b578063536c6bfa1461023957600080fd5b80630e958d6b14610139578063181f5a771461016e57806335f170ef146101ba57806341eade46146101e957600080fd5b3661013457005b600080fd5b34801561014557600080fd5b50610159610154366004611c90565b61041a565b60405190151581526020015b60405180910390f35b34801561017a57600080fd5b50604080518082018252601681527f43434950526563656976657220312e302e302d64657600000000000000000000602082015290516101659190611d53565b3480156101c657600080fd5b506101da6101d5366004611d66565b610465565b60405161016593929190611d83565b3480156101f557600080fd5b50610209610204366004611d66565b61059c565b005b34801561021757600080fd5b5061022b610226366004611dba565b6105e7565b604051908152602001610165565b34801561024557600080fd5b50610209610254366004611df5565b6105fa565b34801561026557600080fd5b50610209610274366004611e21565b610610565b34801561028557600080fd5b50610299610294366004611dba565b61063e565b6040516101659190611e62565b3480156102b257600080fd5b506102096102c1366004611f49565b610849565b3480156102d257600080fd5b50610209610b63565b3480156102e757600080fd5b506102096102f6366004611fbe565b610c60565b34801561030757600080fd5b5061020961031636600461202a565b610e41565b34801561032757600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610165565b34801561037357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610342565b3480156103a657600080fd5b506102096103b536600461202a565b611074565b3480156103c657600080fd5b506102096103d5366004612065565b611173565b3480156103e657600080fd5b506102096103f5366004611dba565b6111f4565b34801561040657600080fd5b506102096104153660046120e8565b61145d565b67ffffffffffffffff831660009081526002602052604080822090516003909101906104499085908590612105565b9081526040519081900360200190205460ff1690509392505050565b6002602052600090815260409020805460018201805460ff909216929161048b90612115565b80601f01602080910402602001604051908101604052809291908181526020018280546104b790612115565b80156105045780601f106104d957610100808354040283529160200191610504565b820191906000526020600020905b8154815290600101906020018083116104e757829003601f168201915b50505050509080600201805461051990612115565b80601f016020809104026020016040519081016040528092919081815260200182805461054590612115565b80156105925780601f1061056757610100808354040283529160200191610592565b820191906000526020600020905b81548152906001019060200180831161057557829003601f168201915b5050505050905083565b6105a4611471565b67ffffffffffffffff16600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60006105f46004836114f4565b92915050565b610602611471565b61060c8282611507565b5050565b610618611471565b61063973ffffffffffffffffffffffffffffffffffffffff84168383611661565b505050565b6040805160a08082018352600080835260208084018290526060848601819052808501819052608085015285825260038152908490208451928301855280548352600181015467ffffffffffffffff16918301919091526002810180549394929391928401916106ad90612115565b80601f01602080910402602001604051908101604052809291908181526020018280546106d990612115565b80156107265780601f106106fb57610100808354040283529160200191610726565b820191906000526020600020905b81548152906001019060200180831161070957829003601f168201915b5050505050815260200160038201805461073f90612115565b80601f016020809104026020016040519081016040528092919081815260200182805461076b90612115565b80156107b85780601f1061078d576101008083540402835291602001916107b8565b820191906000526020600020905b81548152906001019060200180831161079b57829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b8282101561083b5760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff1682526001908101548284015290835290920191016107e6565b505050915250909392505050565b610851611471565b600161085e6004846114f4565b1461089d576040517fb6e78260000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b6108ad8260025b600491906116ee565b506000828152600360209081526040808320815160a08101835281548152600182015467ffffffffffffffff169381019390935260028101805491928401916108f590612115565b80601f016020809104026020016040519081016040528092919081815260200182805461092190612115565b801561096e5780601f106109435761010080835404028352916020019161096e565b820191906000526020600020905b81548152906001019060200180831161095157829003601f168201915b5050505050815260200160038201805461098790612115565b80601f01602080910402602001604051908101604052809291908181526020018280546109b390612115565b8015610a005780601f106109d557610100808354040283529160200191610a00565b820191906000526020600020905b8154815290600101906020018083116109e357829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015610a835760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101610a2e565b5050505081525050905060005b816080015151811015610b1257610b0a8383608001518381518110610ab757610ab7612168565b60200260200101516020015184608001518481518110610ad957610ad9612168565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff166116619092919063ffffffff16565b600101610a90565b5060405173ffffffffffffffffffffffffffffffffffffffff8316815283907fd5038100bd3dc9631d3c3f4f61a3e53e9d466f40c47af9897292c7b35e32a9579060200160405180910390a2505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610be4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610894565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610c68611471565b60005b81811015610d4b5760026000848484818110610c8957610c89612168565b9050602002810190610c9b9190612197565b610ca9906020810190611d66565b67ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600301838383818110610ce057610ce0612168565b9050602002810190610cf29190612197565b610d009060208101906121d5565b604051610d0e929190612105565b90815260405190819003602001902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600101610c6b565b5060005b83811015610e3a57600160026000878785818110610d6f57610d6f612168565b9050602002810190610d819190612197565b610d8f906020810190611d66565b67ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600301868684818110610dc657610dc6612168565b9050602002810190610dd89190612197565b610de69060208101906121d5565b604051610df4929190612105565b90815260405190819003602001902080549115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909216919091179055600101610d4f565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610eb2576040517fd7f73334000000000000000000000000000000000000000000000000000000008152336004820152602401610894565b610ec26040820160208301611d66565b67ffffffffffffffff81166000908152600260205260409020600181018054610eea90612115565b15905080610ef95750805460ff165b15610f3c576040517fd79f2ea400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff83166004820152602401610894565b6040517fcf6730f8000000000000000000000000000000000000000000000000000000008152309063cf6730f890610f78908690600401612347565b600060405180830381600087803b158015610f9257600080fd5b505af1925050508015610fa3575060015b611043573d808015610fd1576040519150601f19603f3d011682016040523d82523d6000602084013e610fd6565b606091505b50610fe3843560016108a4565b508335600090815260036020526040902084906110008282612740565b50506040518435907f55bc02a9ef6f146737edeeb425738006f67f077e7138de3bf84a15bde1a5b56f90611035908490611d53565b60405180910390a250505050565b6040518335907fdf6958669026659bac75ba986685e11a7d271284989f565f2802522663e9a70f90600090a2505050565b3330146110ad576040517f14d4a4e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110bd6040820160208301611d66565b6110ca60408301836121d5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525067ffffffffffffffff8616815260026020526040908190209051600390910193506111289250849150612840565b9081526040519081900360200190205460ff1661063957806040517f5075bb380000000000000000000000000000000000000000000000000000000081526004016108949190611d53565b61117b611471565b67ffffffffffffffff85166000908152600260205260409020600181016111a38587836124cc565b5081156111bb57600281016111b98385836124cc565b505b805460ff16156111ec5780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681555b505050505050565b6111fc611471565b60016112096004836114f4565b14611243576040517fb6e7826000000000000000000000000000000000000000000000000000000000815260048101829052602401610894565b61124e8160006108a4565b506000818152600360209081526040808320815160a08101835281548152600182015467ffffffffffffffff1693810193909352600281018054919284019161129690612115565b80601f01602080910402602001604051908101604052809291908181526020018280546112c290612115565b801561130f5780601f106112e45761010080835404028352916020019161130f565b820191906000526020600020905b8154815290600101906020018083116112f257829003601f168201915b5050505050815260200160038201805461132890612115565b80601f016020809104026020016040519081016040528092919081815260200182805461135490612115565b80156113a15780601f10611376576101008083540402835291602001916113a1565b820191906000526020600020905b81548152906001019060200180831161138457829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156114245760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff1682526001908101548284015290835290920191016113cf565b5050505081525050905060405182907fef3bf8c64bc480286c4f3503b870ceb23e648d2d902e31fb7bb46680da6de8ad90600090a25050565b611465611471565b61146e81611703565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146114f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610894565b565b600061150083836117f8565b9392505050565b80471015611571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610894565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146115cb576040519150601f19603f3d011682016040523d82523d6000602084013e6115d0565b606091505b5050905080610639576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610894565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610639908490611882565b60006116fb84848461198e565b949350505050565b3373ffffffffffffffffffffffffffffffffffffffff821603611782576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610894565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008181526002830160205260408120548015158061181c575061181c84846119ab565b611500576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f456e756d657261626c654d61703a206e6f6e6578697374656e74206b657900006044820152606401610894565b60006118e4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166119b79092919063ffffffff16565b80519091501561063957808060200190518101906119029190612852565b610639576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610894565b600082815260028401602052604081208290556116fb84846119c6565b600061150083836119d2565b60606116fb84846000856119ea565b60006115008383611b03565b60008181526001830160205260408120541515611500565b606082471015611a7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610894565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611aa59190612840565b60006040518083038185875af1925050503d8060008114611ae2576040519150601f19603f3d011682016040523d82523d6000602084013e611ae7565b606091505b5091509150611af887838387611b52565b979650505050505050565b6000818152600183016020526040812054611b4a575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105f4565b5060006105f4565b60608315611be8578251600003611be15773ffffffffffffffffffffffffffffffffffffffff85163b611be1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610894565b50816116fb565b6116fb8383815115611bfd5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108949190611d53565b67ffffffffffffffff8116811461146e57600080fd5b60008083601f840112611c5957600080fd5b50813567ffffffffffffffff811115611c7157600080fd5b602083019150836020828501011115611c8957600080fd5b9250929050565b600080600060408486031215611ca557600080fd5b8335611cb081611c31565b9250602084013567ffffffffffffffff811115611ccc57600080fd5b611cd886828701611c47565b9497909650939450505050565b60005b83811015611d00578181015183820152602001611ce8565b50506000910152565b60008151808452611d21816020860160208601611ce5565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006115006020830184611d09565b600060208284031215611d7857600080fd5b813561150081611c31565b8315158152606060208201526000611d9e6060830185611d09565b8281036040840152611db08185611d09565b9695505050505050565b600060208284031215611dcc57600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461146e57600080fd5b60008060408385031215611e0857600080fd5b8235611e1381611dd3565b946020939093013593505050565b600080600060608486031215611e3657600080fd5b8335611e4181611dd3565b92506020840135611e5181611dd3565b929592945050506040919091013590565b6000602080835283518184015280840151604067ffffffffffffffff821660408601526040860151915060a06060860152611ea060c0860183611d09565b915060608601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080878503016080880152611edc8483611d09565b608089015188820390920160a089015281518082529186019450600092508501905b80831015611f3d578451805173ffffffffffffffffffffffffffffffffffffffff16835286015186830152938501936001929092019190830190611efe565b50979650505050505050565b60008060408385031215611f5c57600080fd5b823591506020830135611f6e81611dd3565b809150509250929050565b60008083601f840112611f8b57600080fd5b50813567ffffffffffffffff811115611fa357600080fd5b6020830191508360208260051b8501011115611c8957600080fd5b60008060008060408587031215611fd457600080fd5b843567ffffffffffffffff80821115611fec57600080fd5b611ff888838901611f79565b9096509450602087013591508082111561201157600080fd5b5061201e87828801611f79565b95989497509550505050565b60006020828403121561203c57600080fd5b813567ffffffffffffffff81111561205357600080fd5b820160a0818503121561150057600080fd5b60008060008060006060868803121561207d57600080fd5b853561208881611c31565b9450602086013567ffffffffffffffff808211156120a557600080fd5b6120b189838a01611c47565b909650945060408801359150808211156120ca57600080fd5b506120d788828901611c47565b969995985093965092949392505050565b6000602082840312156120fa57600080fd5b813561150081611dd3565b8183823760009101908152919050565b600181811c9082168061212957607f821691505b602082108103612162577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126121cb57600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261220a57600080fd5b83018035915067ffffffffffffffff82111561222557600080fd5b602001915036819003821315611c8957600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261226f57600080fd5b830160208101925035905067ffffffffffffffff81111561228f57600080fd5b803603821315611c8957600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8183526000602080850194508260005b8581101561233c57813561230a81611dd3565b73ffffffffffffffffffffffffffffffffffffffff1687528183013583880152604096870196909101906001016122f7565b509495945050505050565b60208152813560208201526000602083013561236281611c31565b67ffffffffffffffff8082166040850152612380604086018661223a565b925060a0606086015261239760c08601848361229e565b9250506123a7606086018661223a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808786030160808801526123dd85838561229e565b9450608088013592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe188360301831261241657600080fd5b6020928801928301923591508382111561242f57600080fd5b8160061b360383131561244157600080fd5b8685030160a0870152611af88482846122e7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f821115610639576000816000526020600020601f850160051c810160208610156124ad5750805b601f850160051c820191505b818110156111ec578281556001016124b9565b67ffffffffffffffff8311156124e4576124e4612455565b6124f8836124f28354612115565b83612484565b6000601f84116001811461254a57600085156125145750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610e3a565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156125995786850135825560209485019460019092019101612579565b50868210156125d4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b600181901b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82168214612643577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b919050565b813561265381611dd3565b73ffffffffffffffffffffffffffffffffffffffff81167fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825550602082013560018201555050565b680100000000000000008311156126b9576126b9612455565b80548382558084101561270b576126cf816125e6565b6126d8856125e6565b6000848152602081209283019291909101905b82821015612707578082558060018301556002820191506126eb565b5050505b5060008181526020812083915b858110156111ec5761272a8383612648565b6040929092019160029190910190600101612718565b8135815560018101602083013561275681611c31565b67ffffffffffffffff8082167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000084541617835561279660408601866121d5565b935091506127a88383600287016124cc565b6127b560608601866121d5565b935091506127c78383600387016124cc565b608085013592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18536030183126127fe57600080fd5b91840191823591508082111561281357600080fd5b506020820191508060061b360382131561282c57600080fd5b61283a8183600486016126a0565b50505050565b600082516121cb818460208701611ce5565b60006020828403121561286457600080fd5b8151801515811461150057600080fdfea164736f6c6343000818000a", +} + +var CCIPReceiverABI = CCIPReceiverMetaData.ABI + +var CCIPReceiverBin = CCIPReceiverMetaData.Bin + +func DeployCCIPReceiver(auth *bind.TransactOpts, backend bind.ContractBackend, router common.Address) (common.Address, *types.Transaction, *CCIPReceiver, error) { + parsed, err := CCIPReceiverMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(CCIPReceiverBin), backend, router) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &CCIPReceiver{address: address, abi: *parsed, CCIPReceiverCaller: CCIPReceiverCaller{contract: contract}, CCIPReceiverTransactor: CCIPReceiverTransactor{contract: contract}, CCIPReceiverFilterer: CCIPReceiverFilterer{contract: contract}}, nil +} + +type CCIPReceiver struct { + address common.Address + abi abi.ABI + CCIPReceiverCaller + CCIPReceiverTransactor + CCIPReceiverFilterer +} + +type CCIPReceiverCaller struct { + contract *bind.BoundContract +} + +type CCIPReceiverTransactor struct { + contract *bind.BoundContract +} + +type CCIPReceiverFilterer struct { + contract *bind.BoundContract +} + +type CCIPReceiverSession struct { + Contract *CCIPReceiver + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type CCIPReceiverCallerSession struct { + Contract *CCIPReceiverCaller + CallOpts bind.CallOpts +} + +type CCIPReceiverTransactorSession struct { + Contract *CCIPReceiverTransactor + TransactOpts bind.TransactOpts +} + +type CCIPReceiverRaw struct { + Contract *CCIPReceiver +} + +type CCIPReceiverCallerRaw struct { + Contract *CCIPReceiverCaller +} + +type CCIPReceiverTransactorRaw struct { + Contract *CCIPReceiverTransactor +} + +func NewCCIPReceiver(address common.Address, backend bind.ContractBackend) (*CCIPReceiver, error) { + abi, err := abi.JSON(strings.NewReader(CCIPReceiverABI)) + if err != nil { + return nil, err + } + contract, err := bindCCIPReceiver(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &CCIPReceiver{address: address, abi: abi, CCIPReceiverCaller: CCIPReceiverCaller{contract: contract}, CCIPReceiverTransactor: CCIPReceiverTransactor{contract: contract}, CCIPReceiverFilterer: CCIPReceiverFilterer{contract: contract}}, nil +} + +func NewCCIPReceiverCaller(address common.Address, caller bind.ContractCaller) (*CCIPReceiverCaller, error) { + contract, err := bindCCIPReceiver(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CCIPReceiverCaller{contract: contract}, nil +} + +func NewCCIPReceiverTransactor(address common.Address, transactor bind.ContractTransactor) (*CCIPReceiverTransactor, error) { + contract, err := bindCCIPReceiver(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CCIPReceiverTransactor{contract: contract}, nil +} + +func NewCCIPReceiverFilterer(address common.Address, filterer bind.ContractFilterer) (*CCIPReceiverFilterer, error) { + contract, err := bindCCIPReceiver(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CCIPReceiverFilterer{contract: contract}, nil +} + +func bindCCIPReceiver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := CCIPReceiverMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_CCIPReceiver *CCIPReceiverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CCIPReceiver.Contract.CCIPReceiverCaller.contract.Call(opts, result, method, params...) +} + +func (_CCIPReceiver *CCIPReceiverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPReceiver.Contract.CCIPReceiverTransactor.contract.Transfer(opts) +} + +func (_CCIPReceiver *CCIPReceiverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CCIPReceiver.Contract.CCIPReceiverTransactor.contract.Transact(opts, method, params...) +} + +func (_CCIPReceiver *CCIPReceiverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CCIPReceiver.Contract.contract.Call(opts, result, method, params...) +} + +func (_CCIPReceiver *CCIPReceiverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPReceiver.Contract.contract.Transfer(opts) +} + +func (_CCIPReceiver *CCIPReceiverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CCIPReceiver.Contract.contract.Transact(opts, method, params...) +} + +func (_CCIPReceiver *CCIPReceiverCaller) GetMessageContents(opts *bind.CallOpts, messageId [32]byte) (ClientAny2EVMMessage, error) { + var out []interface{} + err := _CCIPReceiver.contract.Call(opts, &out, "getMessageContents", messageId) + + if err != nil { + return *new(ClientAny2EVMMessage), err + } + + out0 := *abi.ConvertType(out[0], new(ClientAny2EVMMessage)).(*ClientAny2EVMMessage) + + return out0, err + +} + +func (_CCIPReceiver *CCIPReceiverSession) GetMessageContents(messageId [32]byte) (ClientAny2EVMMessage, error) { + return _CCIPReceiver.Contract.GetMessageContents(&_CCIPReceiver.CallOpts, messageId) +} + +func (_CCIPReceiver *CCIPReceiverCallerSession) GetMessageContents(messageId [32]byte) (ClientAny2EVMMessage, error) { + return _CCIPReceiver.Contract.GetMessageContents(&_CCIPReceiver.CallOpts, messageId) +} + +func (_CCIPReceiver *CCIPReceiverCaller) GetMessageStatus(opts *bind.CallOpts, messageId [32]byte) (*big.Int, error) { + var out []interface{} + err := _CCIPReceiver.contract.Call(opts, &out, "getMessageStatus", messageId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_CCIPReceiver *CCIPReceiverSession) GetMessageStatus(messageId [32]byte) (*big.Int, error) { + return _CCIPReceiver.Contract.GetMessageStatus(&_CCIPReceiver.CallOpts, messageId) +} + +func (_CCIPReceiver *CCIPReceiverCallerSession) GetMessageStatus(messageId [32]byte) (*big.Int, error) { + return _CCIPReceiver.Contract.GetMessageStatus(&_CCIPReceiver.CallOpts, messageId) +} + +func (_CCIPReceiver *CCIPReceiverCaller) GetRouter(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CCIPReceiver.contract.Call(opts, &out, "getRouter") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_CCIPReceiver *CCIPReceiverSession) GetRouter() (common.Address, error) { + return _CCIPReceiver.Contract.GetRouter(&_CCIPReceiver.CallOpts) +} + +func (_CCIPReceiver *CCIPReceiverCallerSession) GetRouter() (common.Address, error) { + return _CCIPReceiver.Contract.GetRouter(&_CCIPReceiver.CallOpts) +} + +func (_CCIPReceiver *CCIPReceiverCaller) IsApprovedSender(opts *bind.CallOpts, sourceChainSelector uint64, senderAddr []byte) (bool, error) { + var out []interface{} + err := _CCIPReceiver.contract.Call(opts, &out, "isApprovedSender", sourceChainSelector, senderAddr) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_CCIPReceiver *CCIPReceiverSession) IsApprovedSender(sourceChainSelector uint64, senderAddr []byte) (bool, error) { + return _CCIPReceiver.Contract.IsApprovedSender(&_CCIPReceiver.CallOpts, sourceChainSelector, senderAddr) +} + +func (_CCIPReceiver *CCIPReceiverCallerSession) IsApprovedSender(sourceChainSelector uint64, senderAddr []byte) (bool, error) { + return _CCIPReceiver.Contract.IsApprovedSender(&_CCIPReceiver.CallOpts, sourceChainSelector, senderAddr) +} + +func (_CCIPReceiver *CCIPReceiverCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CCIPReceiver.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_CCIPReceiver *CCIPReceiverSession) Owner() (common.Address, error) { + return _CCIPReceiver.Contract.Owner(&_CCIPReceiver.CallOpts) +} + +func (_CCIPReceiver *CCIPReceiverCallerSession) Owner() (common.Address, error) { + return _CCIPReceiver.Contract.Owner(&_CCIPReceiver.CallOpts) +} + +func (_CCIPReceiver *CCIPReceiverCaller) SChainConfigs(opts *bind.CallOpts, arg0 uint64) (SChainConfigs, + + error) { + var out []interface{} + err := _CCIPReceiver.contract.Call(opts, &out, "s_chainConfigs", arg0) + + outstruct := new(SChainConfigs) + if err != nil { + return *outstruct, err + } + + outstruct.Disabled = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.Recipient = *abi.ConvertType(out[1], new([]byte)).(*[]byte) + outstruct.ExtraArgsBytes = *abi.ConvertType(out[2], new([]byte)).(*[]byte) + + return *outstruct, err + +} + +func (_CCIPReceiver *CCIPReceiverSession) SChainConfigs(arg0 uint64) (SChainConfigs, + + error) { + return _CCIPReceiver.Contract.SChainConfigs(&_CCIPReceiver.CallOpts, arg0) +} + +func (_CCIPReceiver *CCIPReceiverCallerSession) SChainConfigs(arg0 uint64) (SChainConfigs, + + error) { + return _CCIPReceiver.Contract.SChainConfigs(&_CCIPReceiver.CallOpts, arg0) +} + +func (_CCIPReceiver *CCIPReceiverCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _CCIPReceiver.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_CCIPReceiver *CCIPReceiverSession) TypeAndVersion() (string, error) { + return _CCIPReceiver.Contract.TypeAndVersion(&_CCIPReceiver.CallOpts) +} + +func (_CCIPReceiver *CCIPReceiverCallerSession) TypeAndVersion() (string, error) { + return _CCIPReceiver.Contract.TypeAndVersion(&_CCIPReceiver.CallOpts) +} + +func (_CCIPReceiver *CCIPReceiverTransactor) AbandonFailedMessage(opts *bind.TransactOpts, messageId [32]byte, receiver common.Address) (*types.Transaction, error) { + return _CCIPReceiver.contract.Transact(opts, "abandonFailedMessage", messageId, receiver) +} + +func (_CCIPReceiver *CCIPReceiverSession) AbandonFailedMessage(messageId [32]byte, receiver common.Address) (*types.Transaction, error) { + return _CCIPReceiver.Contract.AbandonFailedMessage(&_CCIPReceiver.TransactOpts, messageId, receiver) +} + +func (_CCIPReceiver *CCIPReceiverTransactorSession) AbandonFailedMessage(messageId [32]byte, receiver common.Address) (*types.Transaction, error) { + return _CCIPReceiver.Contract.AbandonFailedMessage(&_CCIPReceiver.TransactOpts, messageId, receiver) +} + +func (_CCIPReceiver *CCIPReceiverTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPReceiver.contract.Transact(opts, "acceptOwnership") +} + +func (_CCIPReceiver *CCIPReceiverSession) AcceptOwnership() (*types.Transaction, error) { + return _CCIPReceiver.Contract.AcceptOwnership(&_CCIPReceiver.TransactOpts) +} + +func (_CCIPReceiver *CCIPReceiverTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _CCIPReceiver.Contract.AcceptOwnership(&_CCIPReceiver.TransactOpts) +} + +func (_CCIPReceiver *CCIPReceiverTransactor) CcipReceive(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPReceiver.contract.Transact(opts, "ccipReceive", message) +} + +func (_CCIPReceiver *CCIPReceiverSession) CcipReceive(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPReceiver.Contract.CcipReceive(&_CCIPReceiver.TransactOpts, message) +} + +func (_CCIPReceiver *CCIPReceiverTransactorSession) CcipReceive(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPReceiver.Contract.CcipReceive(&_CCIPReceiver.TransactOpts, message) +} + +func (_CCIPReceiver *CCIPReceiverTransactor) DisableChain(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) { + return _CCIPReceiver.contract.Transact(opts, "disableChain", chainSelector) +} + +func (_CCIPReceiver *CCIPReceiverSession) DisableChain(chainSelector uint64) (*types.Transaction, error) { + return _CCIPReceiver.Contract.DisableChain(&_CCIPReceiver.TransactOpts, chainSelector) +} + +func (_CCIPReceiver *CCIPReceiverTransactorSession) DisableChain(chainSelector uint64) (*types.Transaction, error) { + return _CCIPReceiver.Contract.DisableChain(&_CCIPReceiver.TransactOpts, chainSelector) +} + +func (_CCIPReceiver *CCIPReceiverTransactor) EnableChain(opts *bind.TransactOpts, chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _CCIPReceiver.contract.Transact(opts, "enableChain", chainSelector, recipient, _extraArgsBytes) +} + +func (_CCIPReceiver *CCIPReceiverSession) EnableChain(chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _CCIPReceiver.Contract.EnableChain(&_CCIPReceiver.TransactOpts, chainSelector, recipient, _extraArgsBytes) +} + +func (_CCIPReceiver *CCIPReceiverTransactorSession) EnableChain(chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _CCIPReceiver.Contract.EnableChain(&_CCIPReceiver.TransactOpts, chainSelector, recipient, _extraArgsBytes) +} + +func (_CCIPReceiver *CCIPReceiverTransactor) ProcessMessage(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPReceiver.contract.Transact(opts, "processMessage", message) +} + +func (_CCIPReceiver *CCIPReceiverSession) ProcessMessage(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPReceiver.Contract.ProcessMessage(&_CCIPReceiver.TransactOpts, message) +} + +func (_CCIPReceiver *CCIPReceiverTransactorSession) ProcessMessage(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPReceiver.Contract.ProcessMessage(&_CCIPReceiver.TransactOpts, message) +} + +func (_CCIPReceiver *CCIPReceiverTransactor) RetryFailedMessage(opts *bind.TransactOpts, messageId [32]byte) (*types.Transaction, error) { + return _CCIPReceiver.contract.Transact(opts, "retryFailedMessage", messageId) +} + +func (_CCIPReceiver *CCIPReceiverSession) RetryFailedMessage(messageId [32]byte) (*types.Transaction, error) { + return _CCIPReceiver.Contract.RetryFailedMessage(&_CCIPReceiver.TransactOpts, messageId) +} + +func (_CCIPReceiver *CCIPReceiverTransactorSession) RetryFailedMessage(messageId [32]byte) (*types.Transaction, error) { + return _CCIPReceiver.Contract.RetryFailedMessage(&_CCIPReceiver.TransactOpts, messageId) +} + +func (_CCIPReceiver *CCIPReceiverTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _CCIPReceiver.contract.Transact(opts, "transferOwnership", to) +} + +func (_CCIPReceiver *CCIPReceiverSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CCIPReceiver.Contract.TransferOwnership(&_CCIPReceiver.TransactOpts, to) +} + +func (_CCIPReceiver *CCIPReceiverTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CCIPReceiver.Contract.TransferOwnership(&_CCIPReceiver.TransactOpts, to) +} + +func (_CCIPReceiver *CCIPReceiverTransactor) UpdateApprovedSenders(opts *bind.TransactOpts, adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _CCIPReceiver.contract.Transact(opts, "updateApprovedSenders", adds, removes) +} + +func (_CCIPReceiver *CCIPReceiverSession) UpdateApprovedSenders(adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _CCIPReceiver.Contract.UpdateApprovedSenders(&_CCIPReceiver.TransactOpts, adds, removes) +} + +func (_CCIPReceiver *CCIPReceiverTransactorSession) UpdateApprovedSenders(adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _CCIPReceiver.Contract.UpdateApprovedSenders(&_CCIPReceiver.TransactOpts, adds, removes) +} + +func (_CCIPReceiver *CCIPReceiverTransactor) WithdrawNativeToken(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPReceiver.contract.Transact(opts, "withdrawNativeToken", to, amount) +} + +func (_CCIPReceiver *CCIPReceiverSession) WithdrawNativeToken(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPReceiver.Contract.WithdrawNativeToken(&_CCIPReceiver.TransactOpts, to, amount) +} + +func (_CCIPReceiver *CCIPReceiverTransactorSession) WithdrawNativeToken(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPReceiver.Contract.WithdrawNativeToken(&_CCIPReceiver.TransactOpts, to, amount) +} + +func (_CCIPReceiver *CCIPReceiverTransactor) WithdrawTokens(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPReceiver.contract.Transact(opts, "withdrawTokens", token, to, amount) +} + +func (_CCIPReceiver *CCIPReceiverSession) WithdrawTokens(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPReceiver.Contract.WithdrawTokens(&_CCIPReceiver.TransactOpts, token, to, amount) +} + +func (_CCIPReceiver *CCIPReceiverTransactorSession) WithdrawTokens(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPReceiver.Contract.WithdrawTokens(&_CCIPReceiver.TransactOpts, token, to, amount) +} + +func (_CCIPReceiver *CCIPReceiverTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPReceiver.contract.RawTransact(opts, nil) +} + +func (_CCIPReceiver *CCIPReceiverSession) Receive() (*types.Transaction, error) { + return _CCIPReceiver.Contract.Receive(&_CCIPReceiver.TransactOpts) +} + +func (_CCIPReceiver *CCIPReceiverTransactorSession) Receive() (*types.Transaction, error) { + return _CCIPReceiver.Contract.Receive(&_CCIPReceiver.TransactOpts) +} + +type CCIPReceiverMessageAbandonedIterator struct { + Event *CCIPReceiverMessageAbandoned + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverMessageAbandonedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverMessageAbandoned) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverMessageAbandoned) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverMessageAbandonedIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverMessageAbandonedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverMessageAbandoned struct { + MessageId [32]byte + TokenReceiver common.Address + Raw types.Log +} + +func (_CCIPReceiver *CCIPReceiverFilterer) FilterMessageAbandoned(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverMessageAbandonedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiver.contract.FilterLogs(opts, "MessageAbandoned", messageIdRule) + if err != nil { + return nil, err + } + return &CCIPReceiverMessageAbandonedIterator{contract: _CCIPReceiver.contract, event: "MessageAbandoned", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiver *CCIPReceiverFilterer) WatchMessageAbandoned(opts *bind.WatchOpts, sink chan<- *CCIPReceiverMessageAbandoned, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiver.contract.WatchLogs(opts, "MessageAbandoned", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverMessageAbandoned) + if err := _CCIPReceiver.contract.UnpackLog(event, "MessageAbandoned", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiver *CCIPReceiverFilterer) ParseMessageAbandoned(log types.Log) (*CCIPReceiverMessageAbandoned, error) { + event := new(CCIPReceiverMessageAbandoned) + if err := _CCIPReceiver.contract.UnpackLog(event, "MessageAbandoned", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverMessageFailedIterator struct { + Event *CCIPReceiverMessageFailed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverMessageFailedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverMessageFailed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverMessageFailed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverMessageFailedIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverMessageFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverMessageFailed struct { + MessageId [32]byte + Reason []byte + Raw types.Log +} + +func (_CCIPReceiver *CCIPReceiverFilterer) FilterMessageFailed(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverMessageFailedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiver.contract.FilterLogs(opts, "MessageFailed", messageIdRule) + if err != nil { + return nil, err + } + return &CCIPReceiverMessageFailedIterator{contract: _CCIPReceiver.contract, event: "MessageFailed", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiver *CCIPReceiverFilterer) WatchMessageFailed(opts *bind.WatchOpts, sink chan<- *CCIPReceiverMessageFailed, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiver.contract.WatchLogs(opts, "MessageFailed", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverMessageFailed) + if err := _CCIPReceiver.contract.UnpackLog(event, "MessageFailed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiver *CCIPReceiverFilterer) ParseMessageFailed(log types.Log) (*CCIPReceiverMessageFailed, error) { + event := new(CCIPReceiverMessageFailed) + if err := _CCIPReceiver.contract.UnpackLog(event, "MessageFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverMessageRecoveredIterator struct { + Event *CCIPReceiverMessageRecovered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverMessageRecoveredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverMessageRecovered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverMessageRecovered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverMessageRecoveredIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverMessageRecoveredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverMessageRecovered struct { + MessageId [32]byte + Raw types.Log +} + +func (_CCIPReceiver *CCIPReceiverFilterer) FilterMessageRecovered(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverMessageRecoveredIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiver.contract.FilterLogs(opts, "MessageRecovered", messageIdRule) + if err != nil { + return nil, err + } + return &CCIPReceiverMessageRecoveredIterator{contract: _CCIPReceiver.contract, event: "MessageRecovered", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiver *CCIPReceiverFilterer) WatchMessageRecovered(opts *bind.WatchOpts, sink chan<- *CCIPReceiverMessageRecovered, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiver.contract.WatchLogs(opts, "MessageRecovered", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverMessageRecovered) + if err := _CCIPReceiver.contract.UnpackLog(event, "MessageRecovered", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiver *CCIPReceiverFilterer) ParseMessageRecovered(log types.Log) (*CCIPReceiverMessageRecovered, error) { + event := new(CCIPReceiverMessageRecovered) + if err := _CCIPReceiver.contract.UnpackLog(event, "MessageRecovered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverMessageSucceededIterator struct { + Event *CCIPReceiverMessageSucceeded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverMessageSucceededIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverMessageSucceeded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverMessageSucceeded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverMessageSucceededIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverMessageSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverMessageSucceeded struct { + MessageId [32]byte + Raw types.Log +} + +func (_CCIPReceiver *CCIPReceiverFilterer) FilterMessageSucceeded(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverMessageSucceededIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiver.contract.FilterLogs(opts, "MessageSucceeded", messageIdRule) + if err != nil { + return nil, err + } + return &CCIPReceiverMessageSucceededIterator{contract: _CCIPReceiver.contract, event: "MessageSucceeded", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiver *CCIPReceiverFilterer) WatchMessageSucceeded(opts *bind.WatchOpts, sink chan<- *CCIPReceiverMessageSucceeded, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiver.contract.WatchLogs(opts, "MessageSucceeded", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverMessageSucceeded) + if err := _CCIPReceiver.contract.UnpackLog(event, "MessageSucceeded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiver *CCIPReceiverFilterer) ParseMessageSucceeded(log types.Log) (*CCIPReceiverMessageSucceeded, error) { + event := new(CCIPReceiverMessageSucceeded) + if err := _CCIPReceiver.contract.UnpackLog(event, "MessageSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverOwnershipTransferRequestedIterator struct { + Event *CCIPReceiverOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_CCIPReceiver *CCIPReceiverFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPReceiverOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPReceiver.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &CCIPReceiverOwnershipTransferRequestedIterator{contract: _CCIPReceiver.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiver *CCIPReceiverFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPReceiverOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPReceiver.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverOwnershipTransferRequested) + if err := _CCIPReceiver.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiver *CCIPReceiverFilterer) ParseOwnershipTransferRequested(log types.Log) (*CCIPReceiverOwnershipTransferRequested, error) { + event := new(CCIPReceiverOwnershipTransferRequested) + if err := _CCIPReceiver.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverOwnershipTransferredIterator struct { + Event *CCIPReceiverOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_CCIPReceiver *CCIPReceiverFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPReceiverOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPReceiver.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &CCIPReceiverOwnershipTransferredIterator{contract: _CCIPReceiver.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiver *CCIPReceiverFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPReceiverOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPReceiver.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverOwnershipTransferred) + if err := _CCIPReceiver.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiver *CCIPReceiverFilterer) ParseOwnershipTransferred(log types.Log) (*CCIPReceiverOwnershipTransferred, error) { + event := new(CCIPReceiverOwnershipTransferred) + if err := _CCIPReceiver.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type SChainConfigs struct { + Disabled bool + Recipient []byte + ExtraArgsBytes []byte +} + +func (_CCIPReceiver *CCIPReceiver) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _CCIPReceiver.abi.Events["MessageAbandoned"].ID: + return _CCIPReceiver.ParseMessageAbandoned(log) + case _CCIPReceiver.abi.Events["MessageFailed"].ID: + return _CCIPReceiver.ParseMessageFailed(log) + case _CCIPReceiver.abi.Events["MessageRecovered"].ID: + return _CCIPReceiver.ParseMessageRecovered(log) + case _CCIPReceiver.abi.Events["MessageSucceeded"].ID: + return _CCIPReceiver.ParseMessageSucceeded(log) + case _CCIPReceiver.abi.Events["OwnershipTransferRequested"].ID: + return _CCIPReceiver.ParseOwnershipTransferRequested(log) + case _CCIPReceiver.abi.Events["OwnershipTransferred"].ID: + return _CCIPReceiver.ParseOwnershipTransferred(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (CCIPReceiverMessageAbandoned) Topic() common.Hash { + return common.HexToHash("0xd5038100bd3dc9631d3c3f4f61a3e53e9d466f40c47af9897292c7b35e32a957") +} + +func (CCIPReceiverMessageFailed) Topic() common.Hash { + return common.HexToHash("0x55bc02a9ef6f146737edeeb425738006f67f077e7138de3bf84a15bde1a5b56f") +} + +func (CCIPReceiverMessageRecovered) Topic() common.Hash { + return common.HexToHash("0xef3bf8c64bc480286c4f3503b870ceb23e648d2d902e31fb7bb46680da6de8ad") +} + +func (CCIPReceiverMessageSucceeded) Topic() common.Hash { + return common.HexToHash("0xdf6958669026659bac75ba986685e11a7d271284989f565f2802522663e9a70f") +} + +func (CCIPReceiverOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (CCIPReceiverOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (_CCIPReceiver *CCIPReceiver) Address() common.Address { + return _CCIPReceiver.address +} + +type CCIPReceiverInterface interface { + GetMessageContents(opts *bind.CallOpts, messageId [32]byte) (ClientAny2EVMMessage, error) + + GetMessageStatus(opts *bind.CallOpts, messageId [32]byte) (*big.Int, error) + + GetRouter(opts *bind.CallOpts) (common.Address, error) + + IsApprovedSender(opts *bind.CallOpts, sourceChainSelector uint64, senderAddr []byte) (bool, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + SChainConfigs(opts *bind.CallOpts, arg0 uint64) (SChainConfigs, + + error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AbandonFailedMessage(opts *bind.TransactOpts, messageId [32]byte, receiver common.Address) (*types.Transaction, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + CcipReceive(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) + + DisableChain(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) + + EnableChain(opts *bind.TransactOpts, chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) + + ProcessMessage(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) + + RetryFailedMessage(opts *bind.TransactOpts, messageId [32]byte) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + UpdateApprovedSenders(opts *bind.TransactOpts, adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) + + WithdrawNativeToken(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) + + WithdrawTokens(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) + + Receive(opts *bind.TransactOpts) (*types.Transaction, error) + + FilterMessageAbandoned(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverMessageAbandonedIterator, error) + + WatchMessageAbandoned(opts *bind.WatchOpts, sink chan<- *CCIPReceiverMessageAbandoned, messageId [][32]byte) (event.Subscription, error) + + ParseMessageAbandoned(log types.Log) (*CCIPReceiverMessageAbandoned, error) + + FilterMessageFailed(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverMessageFailedIterator, error) + + WatchMessageFailed(opts *bind.WatchOpts, sink chan<- *CCIPReceiverMessageFailed, messageId [][32]byte) (event.Subscription, error) + + ParseMessageFailed(log types.Log) (*CCIPReceiverMessageFailed, error) + + FilterMessageRecovered(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverMessageRecoveredIterator, error) + + WatchMessageRecovered(opts *bind.WatchOpts, sink chan<- *CCIPReceiverMessageRecovered, messageId [][32]byte) (event.Subscription, error) + + ParseMessageRecovered(log types.Log) (*CCIPReceiverMessageRecovered, error) + + FilterMessageSucceeded(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverMessageSucceededIterator, error) + + WatchMessageSucceeded(opts *bind.WatchOpts, sink chan<- *CCIPReceiverMessageSucceeded, messageId [][32]byte) (event.Subscription, error) + + ParseMessageSucceeded(log types.Log) (*CCIPReceiverMessageSucceeded, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPReceiverOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPReceiverOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*CCIPReceiverOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPReceiverOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPReceiverOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*CCIPReceiverOwnershipTransferred, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/ccip/generated/ccipReceiverWithAck/ccipReceiverWithAck.go b/core/gethwrappers/ccip/generated/ccipReceiverWithAck/ccipReceiverWithAck.go new file mode 100644 index 0000000000..f695b20319 --- /dev/null +++ b/core/gethwrappers/ccip/generated/ccipReceiverWithAck/ccipReceiverWithAck.go @@ -0,0 +1,1927 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ccipReceiverWithAck + +import ( + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +type ClientAny2EVMMessage struct { + MessageId [32]byte + SourceChainSelector uint64 + Sender []byte + Data []byte + DestTokenAmounts []ClientEVMTokenAmount +} + +type ClientEVMTokenAmount struct { + Token common.Address + Amount *big.Int +} + +type ICCIPClientBaseapprovedSenderUpdate struct { + DestChainSelector uint64 + Sender []byte +} + +var CCIPReceiverWithAckMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"feeToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrorCase\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMagicBytes\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"}],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"InvalidRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"name\":\"InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageAlreadyAcknowledged\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageNotFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySelf\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newToken\",\"type\":\"address\"}],\"name\":\"FeeTokenModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"MessageAckReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"incomingMessageId\",\"type\":\"bytes32\"}],\"name\":\"MessageAckSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageRecovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"incomingMessageId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ACKMessageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"ACKMESSAGEMAGICBYTES\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"ccipReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"disableChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_extraArgsBytes\",\"type\":\"bytes\"}],\"name\":\"enableChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"getMessageContents\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"getMessageStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"senderAddr\",\"type\":\"bytes\"}],\"name\":\"isApprovedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"modifyFeeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"processMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"retryFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"s_chains\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraArgsBytes\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_feeToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"s_messageStatus\",\"outputs\":[{\"internalType\":\"enumCCIPReceiverWithACK.MessageStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"simRevert\",\"type\":\"bool\"}],\"name\":\"setSimRevert\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"internalType\":\"structICCIPClientBase.approvedSenderUpdate[]\",\"name\":\"adds\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"internalType\":\"structICCIPClientBase.approvedSenderUpdate[]\",\"name\":\"removes\",\"type\":\"tuple[]\"}],\"name\":\"updateApprovedSenders\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawNativeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60a06040523480156200001157600080fd5b5060405162003c7a38038062003c7a8339810160408190526200003491620005c4565b818033806000816200008d5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c057620000c0816200013c565b5050506001600160a01b038116620000eb576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b0390811660805260078054610100600160a81b0319166101009285169283021790551590506200013457620001346001600160a01b03821683600019620001e7565b5050620006c1565b336001600160a01b03821603620001965760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000084565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b801580620002655750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156200023d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000263919062000603565b155b620002d95760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606482015260840162000084565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620003319185916200033616565b505050565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649082015260009062000385906001600160a01b03851690849062000407565b805190915015620003315780806020019051810190620003a691906200061d565b620003315760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000084565b606062000418848460008562000420565b949350505050565b606082471015620004835760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000084565b600080866001600160a01b03168587604051620004a191906200066e565b60006040518083038185875af1925050503d8060008114620004e0576040519150601f19603f3d011682016040523d82523d6000602084013e620004e5565b606091505b509092509050620004f98783838762000504565b979650505050505050565b606083156200057857825160000362000570576001600160a01b0385163b620005705760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000084565b508162000418565b6200041883838151156200058f5781518083602001fd5b8060405162461bcd60e51b81526004016200008491906200068c565b6001600160a01b0381168114620005c157600080fd5b50565b60008060408385031215620005d857600080fd5b8251620005e581620005ab565b6020840151909250620005f881620005ab565b809150509250929050565b6000602082840312156200061657600080fd5b5051919050565b6000602082840312156200063057600080fd5b815180151581146200064157600080fd5b9392505050565b60005b83811015620006655781810151838201526020016200064b565b50506000910152565b600082516200068281846020870162000648565b9190910192915050565b6020815260008251806020840152620006ad81604085016020870162000648565b601f01601f19169190910160400192915050565b60805161357a6200070060003960008181610451015281816105a10152818161063f01528181610dfd01528181611c450152611d11015261357a6000f3fe6080604052600436106101615760003560e01c80636939cd97116100bf578063b0f479a111610079578063e4ca875411610056578063e4ca8754146104b5578063f2fde38b146104d5578063ff2deec3146104f557005b8063b0f479a114610442578063cf6730f814610475578063d8469e401461049557005b80638462a2b9116100a75780638462a2b9146103b657806385572ffb146103d65780638da5cb5b146103f657005b80636939cd971461037457806379ba5097146103a157005b806341eade461161011b578063536c6bfa116100f8578063536c6bfa146103065780635dc5ebdb146103265780635e35359e1461035457005b806341eade46146102985780635075a9d4146102b857806352f813c3146102e657005b806311e85dff1161014957806311e85dff146101e0578063181f5a77146102005780633a51b79e1461024f57005b806305bfe9821461016a5780630e958d6b146101b057005b3661016857005b005b34801561017657600080fd5b5061019a610185366004612541565b60086020526000908152604090205460ff1681565b6040516101a79190612589565b60405180910390f35b3480156101bc57600080fd5b506101d06101cb366004612629565b610527565b60405190151581526020016101a7565b3480156101ec57600080fd5b506101686101fb3660046126a0565b610571565b34801561020c57600080fd5b5060408051808201909152601d81527f4343495052656365697665725769746841434b20312e302e302d64657600000060208201525b6040516101a7919061272b565b34801561025b57600080fd5b506102426040518060400160405280601581526020017f4d4553534147455f41434b4e4f574c45444745445f000000000000000000000081525081565b3480156102a457600080fd5b506101686102b336600461273e565b610701565b3480156102c457600080fd5b506102d86102d3366004612541565b610740565b6040519081526020016101a7565b3480156102f257600080fd5b50610168610301366004612769565b610753565b34801561031257600080fd5b50610168610321366004612786565b61078c565b34801561033257600080fd5b5061034661034136600461273e565b6107a2565b6040516101a79291906127b2565b34801561036057600080fd5b5061016861036f3660046127e0565b6108ce565b34801561038057600080fd5b5061039461038f366004612541565b6108f7565b6040516101a7919061287e565b3480156103ad57600080fd5b50610168610b02565b3480156103c257600080fd5b506101686103d1366004612957565b610c04565b3480156103e257600080fd5b506101686103f13660046129c3565b610de5565b34801561040257600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a7565b34801561044e57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061041d565b34801561048157600080fd5b506101686104903660046129c3565b6110d5565b3480156104a157600080fd5b506101686104b03660046129fe565b6112f2565b3480156104c157600080fd5b506101686104d0366004612541565b611354565b3480156104e157600080fd5b506101686104f03660046126a0565b6115d2565b34801561050157600080fd5b5060075461041d90610100900473ffffffffffffffffffffffffffffffffffffffff1681565b67ffffffffffffffff8316600090815260026020819052604080832090519101906105559085908590612a81565b9081526040519081900360200190205460ff1690509392505050565b6105796115e6565b600754610100900473ffffffffffffffffffffffffffffffffffffffff16156105e6576105e67f0000000000000000000000000000000000000000000000000000000000000000600754610100900473ffffffffffffffffffffffffffffffffffffffff16906000611669565b6007805473ffffffffffffffffffffffffffffffffffffffff8381166101008181027fffffffffffffffffffffff0000000000000000000000000000000000000000ff851617909455929091041690156106a3576106a37f0000000000000000000000000000000000000000000000000000000000000000600754610100900473ffffffffffffffffffffffffffffffffffffffff16907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611669565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f4a1cb6b940121ea2ba30fb9b494035cbfe2d4b6b080db8b502150410bef7eb4e60405160405180910390a35050565b6107096115e6565b67ffffffffffffffff811660009081526002602052604081209061072d82826124f3565b61073b6001830160006124f3565b505050565b600061074d600483611869565b92915050565b61075b6115e6565b600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6107946115e6565b61079e828261187c565b5050565b6002602052600090815260409020805481906107bd90612a91565b80601f01602080910402602001604051908101604052809291908181526020018280546107e990612a91565b80156108365780601f1061080b57610100808354040283529160200191610836565b820191906000526020600020905b81548152906001019060200180831161081957829003601f168201915b50505050509080600101805461084b90612a91565b80601f016020809104026020016040519081016040528092919081815260200182805461087790612a91565b80156108c45780601f10610899576101008083540402835291602001916108c4565b820191906000526020600020905b8154815290600101906020018083116108a757829003601f168201915b5050505050905082565b6108d66115e6565b61073b73ffffffffffffffffffffffffffffffffffffffff841683836119d6565b6040805160a08082018352600080835260208084018290526060848601819052808501819052608085015285825260038152908490208451928301855280548352600181015467ffffffffffffffff169183019190915260028101805493949293919284019161096690612a91565b80601f016020809104026020016040519081016040528092919081815260200182805461099290612a91565b80156109df5780601f106109b4576101008083540402835291602001916109df565b820191906000526020600020905b8154815290600101906020018083116109c257829003601f168201915b505050505081526020016003820180546109f890612a91565b80601f0160208091040260200160405190810160405280929190818152602001828054610a2490612a91565b8015610a715780601f10610a4657610100808354040283529160200191610a71565b820191906000526020600020905b815481529060010190602001808311610a5457829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015610af45760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101610a9f565b505050915250909392505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610c0c6115e6565b60005b81811015610cef5760026000848484818110610c2d57610c2d612ae4565b9050602002810190610c3f9190612b13565b610c4d90602081019061273e565b67ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600201838383818110610c8457610c84612ae4565b9050602002810190610c969190612b13565b610ca4906020810190612b51565b604051610cb2929190612a81565b90815260405190819003602001902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600101610c0f565b5060005b83811015610dde57600160026000878785818110610d1357610d13612ae4565b9050602002810190610d259190612b13565b610d3390602081019061273e565b67ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600201868684818110610d6a57610d6a612ae4565b9050602002810190610d7c9190612b13565b610d8a906020810190612b51565b604051610d98929190612a81565b90815260405190819003602001902080549115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909216919091179055600101610cf3565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610e56576040517fd7f73334000000000000000000000000000000000000000000000000000000008152336004820152602401610b7f565b610e66604082016020830161273e565b610e736040830183612b51565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525067ffffffffffffffff8616815260026020819052604091829020915191019350610ed09250849150612bb6565b9081526040519081900360200190205460ff16610f1b57806040517f5075bb38000000000000000000000000000000000000000000000000000000008152600401610b7f919061272b565b610f2b604084016020850161273e565b67ffffffffffffffff811660009081526002602052604090208054610f4f90612a91565b9050600003610f96576040517fd79f2ea400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610b7f565b6040517fcf6730f8000000000000000000000000000000000000000000000000000000008152309063cf6730f890610fd2908790600401612cca565b600060405180830381600087803b158015610fec57600080fd5b505af1925050508015610ffd575060015b6110a2573d80801561102b576040519150601f19603f3d011682016040523d82523d6000602084013e611030565b606091505b50611042853560015b60049190611a2c565b5084356000908152600360205260409020859061105f82826130cb565b50506040518535907f55bc02a9ef6f146737edeeb425738006f67f077e7138de3bf84a15bde1a5b56f9061109490849061272b565b60405180910390a2506110cf565b6040518435907fdf6958669026659bac75ba986685e11a7d271284989f565f2802522663e9a70f90600090a25b50505050565b33301461110e576040517f14d4a4e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061111d6060830183612b51565b81019061112a91906132d9565b90506000816040015160018111156111445761114461255a565b036111525761079e82611a41565b60018160400151600181111561116a5761116a61255a565b0361079e57600080826020015180602001905181019061118a9190613385565b60408051808201909152601581527f4d4553534147455f41434b4e4f574c45444745445f000000000000000000000060209182015282519083012091935091507f1c778f21871bcc06cfebd177c4d0360c2f3550962fb071f69ed007e4f55f23b214611222576040517f9f0b03b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260008281526008602052604090205460ff1660028111156112475761124761255a565b03611281576040517f33704b2800000000000000000000000000000000000000000000000000000000815260048101829052602401610b7f565b60008181526008602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600217905590518281527fef0cb160d3dc564cde61ae97d9981f9c4d92ace727a2ec202b18b223ea832a79910160405180910390a150505050565b6112fa6115e6565b67ffffffffffffffff8516600090815260026020526040902061131e848683612e4f565b508015610dde5767ffffffffffffffff8516600090815260026020526040902060010161134c828483612e4f565b505050505050565b61135c6115e6565b6001611369600483611869565b146113a3576040517fb6e7826000000000000000000000000000000000000000000000000000000000815260048101829052602401610b7f565b6113ae816000611039565b506000818152600360209081526040808320815160a08101835281548152600182015467ffffffffffffffff169381019390935260028101805491928401916113f690612a91565b80601f016020809104026020016040519081016040528092919081815260200182805461142290612a91565b801561146f5780601f106114445761010080835404028352916020019161146f565b820191906000526020600020905b81548152906001019060200180831161145257829003601f168201915b5050505050815260200160038201805461148890612a91565b80601f01602080910402602001604051908101604052809291908181526020018280546114b490612a91565b80156115015780601f106114d657610100808354040283529160200191611501565b820191906000526020600020905b8154815290600101906020018083116114e457829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156115845760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff16825260019081015482840152908352909201910161152f565b5050505081525050905061159781611df7565b6115a2600483611e9d565b5060405182907fef3bf8c64bc480286c4f3503b870ceb23e648d2d902e31fb7bb46680da6de8ad90600090a25050565b6115da6115e6565b6115e381611ea9565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314611667576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610b7f565b565b80158061170957506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156116e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117079190613406565b155b611795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610b7f565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261073b9084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611f9e565b600061187583836120aa565b9392505050565b804710156118e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b7f565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114611940576040519150601f19603f3d011682016040523d82523d6000602084013e611945565b606091505b505090508061073b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b7f565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261073b9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016117e7565b6000611a39848484612134565b949350505050565b6040805160008082526020820190925281611a7e565b6040805180820190915260008082526020820152815260200190600190039081611a575790505b50905060006040518060a00160405280848060400190611a9e9190612b51565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080518082018252601581527f4d4553534147455f41434b4e4f574c45444745445f0000000000000000000000602082810191909152915192820192611b1f928835910161341f565b6040516020818303038152906040528152602001838152602001600760019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160026000866020016020810190611b8e919061273e565b67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206001018054611bbe90612a91565b80601f0160208091040260200160405190810160405280929190818152602001828054611bea90612a91565b8015611c375780601f10611c0c57610100808354040283529160200191611c37565b820191906000526020600020905b815481529060010190602001808311611c1a57829003601f168201915b5050505050815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166320487ded856020016020810190611c92919061273e565b846040518363ffffffff1660e01b8152600401611cb0929190613441565b602060405180830381865afa158015611ccd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf19190613406565b60075490915060009073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116916396f4e9f9916101009091041615611d4c576000611d4e565b835b611d5e6040890160208a0161273e565b866040518463ffffffff1660e01b8152600401611d7c929190613441565b60206040518083038185885af1158015611d9a573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611dbf9190613406565b60405190915081908635907f9102b9031c3c59d8320bf14d84d7d7a3434366b91032fad1c87579cfc62b237290600090a35050505050565b60005b81608001515181101561079e57600082608001518281518110611e1f57611e1f612ae4565b6020026020010151602001519050600083608001518381518110611e4557611e45612ae4565b6020026020010151600001519050611e93611e7560005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff831690846119d6565b5050600101611dfa565b60006118758383612151565b3373ffffffffffffffffffffffffffffffffffffffff821603611f28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610b7f565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000612000826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661216e9092919063ffffffff16565b80519091501561073b578080602001905181019061201e919061350e565b61073b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b7f565b6000818152600283016020526040812054801515806120ce57506120ce848461217d565b611875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f456e756d657261626c654d61703a206e6f6e6578697374656e74206b657900006044820152606401610b7f565b60008281526002840160205260408120829055611a398484612189565b600081815260028301602052604081208190556118758383612195565b6060611a3984846000856121a1565b600061187583836122ba565b600061187583836122d2565b60006118758383612321565b606082471015612233576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b7f565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161225c9190612bb6565b60006040518083038185875af1925050503d8060008114612299576040519150601f19603f3d011682016040523d82523d6000602084013e61229e565b606091505b50915091506122af87838387612414565b979650505050505050565b60008181526001830160205260408120541515611875565b60008181526001830160205260408120546123195750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074d565b50600061074d565b6000818152600183016020526040812054801561240a57600061234560018361352b565b85549091506000906123599060019061352b565b90508181146123be57600086600001828154811061237957612379612ae4565b906000526020600020015490508087600001848154811061239c5761239c612ae4565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806123cf576123cf61353e565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074d565b600091505061074d565b606083156124aa5782516000036124a35773ffffffffffffffffffffffffffffffffffffffff85163b6124a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b7f565b5081611a39565b611a3983838151156124bf5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7f919061272b565b5080546124ff90612a91565b6000825580601f1061250f575050565b601f0160209004906000526020600020908101906115e391905b8082111561253d5760008155600101612529565b5090565b60006020828403121561255357600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106125c4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b67ffffffffffffffff811681146115e357600080fd5b60008083601f8401126125f257600080fd5b50813567ffffffffffffffff81111561260a57600080fd5b60208301915083602082850101111561262257600080fd5b9250929050565b60008060006040848603121561263e57600080fd5b8335612649816125ca565b9250602084013567ffffffffffffffff81111561266557600080fd5b612671868287016125e0565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146115e357600080fd5b6000602082840312156126b257600080fd5b81356118758161267e565b60005b838110156126d85781810151838201526020016126c0565b50506000910152565b600081518084526126f98160208601602086016126bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061187560208301846126e1565b60006020828403121561275057600080fd5b8135611875816125ca565b80151581146115e357600080fd5b60006020828403121561277b57600080fd5b81356118758161275b565b6000806040838503121561279957600080fd5b82356127a48161267e565b946020939093013593505050565b6040815260006127c560408301856126e1565b82810360208401526127d781856126e1565b95945050505050565b6000806000606084860312156127f557600080fd5b83356128008161267e565b925060208401356128108161267e565b929592945050506040919091013590565b60008151808452602080850194506020840160005b83811015612873578151805173ffffffffffffffffffffffffffffffffffffffff1688528301518388015260409096019590820190600101612836565b509495945050505050565b602081528151602082015267ffffffffffffffff60208301511660408201526000604083015160a060608401526128b860c08401826126e1565b905060608401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160808601526128f483836126e1565b925060808601519150808584030160a0860152506127d78282612821565b60008083601f84011261292457600080fd5b50813567ffffffffffffffff81111561293c57600080fd5b6020830191508360208260051b850101111561262257600080fd5b6000806000806040858703121561296d57600080fd5b843567ffffffffffffffff8082111561298557600080fd5b61299188838901612912565b909650945060208701359150808211156129aa57600080fd5b506129b787828801612912565b95989497509550505050565b6000602082840312156129d557600080fd5b813567ffffffffffffffff8111156129ec57600080fd5b820160a0818503121561187557600080fd5b600080600080600060608688031215612a1657600080fd5b8535612a21816125ca565b9450602086013567ffffffffffffffff80821115612a3e57600080fd5b612a4a89838a016125e0565b90965094506040880135915080821115612a6357600080fd5b50612a70888289016125e0565b969995985093965092949392505050565b8183823760009101908152919050565b600181811c90821680612aa557607f821691505b602082108103612ade577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112612b4757600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612b8657600080fd5b83018035915067ffffffffffffffff821115612ba157600080fd5b60200191503681900382131561262257600080fd5b60008251612b478184602087016126bd565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612bfd57600080fd5b830160208101925035905067ffffffffffffffff811115612c1d57600080fd5b80360382131561262257600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8183526000602080850194508260005b85811015612873578135612c988161267e565b73ffffffffffffffffffffffffffffffffffffffff168752818301358388015260409687019690910190600101612c85565b602081528135602082015260006020830135612ce5816125ca565b67ffffffffffffffff8082166040850152612d036040860186612bc8565b925060a06060860152612d1a60c086018483612c2c565b925050612d2a6060860186612bc8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080878603016080880152612d60858385612c2c565b9450608088013592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1883603018312612d9957600080fd5b60209288019283019235915083821115612db257600080fd5b8160061b3603831315612dc457600080fd5b8685030160a08701526122af848284612c75565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82111561073b576000816000526020600020601f850160051c81016020861015612e305750805b601f850160051c820191505b8181101561134c57828155600101612e3c565b67ffffffffffffffff831115612e6757612e67612dd8565b612e7b83612e758354612a91565b83612e07565b6000601f841160018114612ecd5760008515612e975750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610dde565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015612f1c5786850135825560209485019460019092019101612efc565b5086821015612f57577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8135612fa38161267e565b73ffffffffffffffffffffffffffffffffffffffff81167fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825550602082013560018201555050565b6801000000000000000083111561300957613009612dd8565b8054838255808410156130965760017f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808316831461304a5761304a612f69565b808616861461305b5761305b612f69565b5060008360005260206000208360011b81018760011b820191505b80821015613091578282558284830155600282019150613076565b505050505b5060008181526020812083915b8581101561134c576130b58383612f98565b60409290920191600291909101906001016130a3565b813581556001810160208301356130e1816125ca565b67ffffffffffffffff8082167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008454161783556131216040860186612b51565b93509150613133838360028701612e4f565b6131406060860186612b51565b93509150613152838360038701612e4f565b608085013592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe185360301831261318957600080fd5b91840191823591508082111561319e57600080fd5b506020820191508060061b36038213156131b757600080fd5b6110cf818360048601612ff0565b6040516060810167ffffffffffffffff811182821017156131e8576131e8612dd8565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561323557613235612dd8565b604052919050565b600067ffffffffffffffff82111561325757613257612dd8565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261329457600080fd5b81356132a76132a28261323d565b6131ee565b8181528460208386010111156132bc57600080fd5b816020850160208301376000918101602001919091529392505050565b6000602082840312156132eb57600080fd5b813567ffffffffffffffff8082111561330357600080fd5b908301906060828603121561331757600080fd5b61331f6131c5565b82358281111561332e57600080fd5b61333a87828601613283565b82525060208301358281111561334f57600080fd5b61335b87828601613283565b602083015250604083013592506002831061337557600080fd5b6040810192909252509392505050565b6000806040838503121561339857600080fd5b825167ffffffffffffffff8111156133af57600080fd5b8301601f810185136133c057600080fd5b80516133ce6132a28261323d565b8181528660208385010111156133e357600080fd5b6133f48260208301602086016126bd565b60209590950151949694955050505050565b60006020828403121561341857600080fd5b5051919050565b60408152600061343260408301856126e1565b90508260208301529392505050565b67ffffffffffffffff83168152604060208201526000825160a0604084015261346d60e08401826126e1565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0808584030160608601526134a983836126e1565b925060408601519150808584030160808601526134c68383612821565b925073ffffffffffffffffffffffffffffffffffffffff60608701511660a086015260808601519150808584030160c08601525061350482826126e1565b9695505050505050565b60006020828403121561352057600080fd5b81516118758161275b565b8181038181111561074d5761074d612f69565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000818000a", +} + +var CCIPReceiverWithAckABI = CCIPReceiverWithAckMetaData.ABI + +var CCIPReceiverWithAckBin = CCIPReceiverWithAckMetaData.Bin + +func DeployCCIPReceiverWithAck(auth *bind.TransactOpts, backend bind.ContractBackend, router common.Address, feeToken common.Address) (common.Address, *types.Transaction, *CCIPReceiverWithAck, error) { + parsed, err := CCIPReceiverWithAckMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(CCIPReceiverWithAckBin), backend, router, feeToken) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &CCIPReceiverWithAck{address: address, abi: *parsed, CCIPReceiverWithAckCaller: CCIPReceiverWithAckCaller{contract: contract}, CCIPReceiverWithAckTransactor: CCIPReceiverWithAckTransactor{contract: contract}, CCIPReceiverWithAckFilterer: CCIPReceiverWithAckFilterer{contract: contract}}, nil +} + +type CCIPReceiverWithAck struct { + address common.Address + abi abi.ABI + CCIPReceiverWithAckCaller + CCIPReceiverWithAckTransactor + CCIPReceiverWithAckFilterer +} + +type CCIPReceiverWithAckCaller struct { + contract *bind.BoundContract +} + +type CCIPReceiverWithAckTransactor struct { + contract *bind.BoundContract +} + +type CCIPReceiverWithAckFilterer struct { + contract *bind.BoundContract +} + +type CCIPReceiverWithAckSession struct { + Contract *CCIPReceiverWithAck + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type CCIPReceiverWithAckCallerSession struct { + Contract *CCIPReceiverWithAckCaller + CallOpts bind.CallOpts +} + +type CCIPReceiverWithAckTransactorSession struct { + Contract *CCIPReceiverWithAckTransactor + TransactOpts bind.TransactOpts +} + +type CCIPReceiverWithAckRaw struct { + Contract *CCIPReceiverWithAck +} + +type CCIPReceiverWithAckCallerRaw struct { + Contract *CCIPReceiverWithAckCaller +} + +type CCIPReceiverWithAckTransactorRaw struct { + Contract *CCIPReceiverWithAckTransactor +} + +func NewCCIPReceiverWithAck(address common.Address, backend bind.ContractBackend) (*CCIPReceiverWithAck, error) { + abi, err := abi.JSON(strings.NewReader(CCIPReceiverWithAckABI)) + if err != nil { + return nil, err + } + contract, err := bindCCIPReceiverWithAck(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &CCIPReceiverWithAck{address: address, abi: abi, CCIPReceiverWithAckCaller: CCIPReceiverWithAckCaller{contract: contract}, CCIPReceiverWithAckTransactor: CCIPReceiverWithAckTransactor{contract: contract}, CCIPReceiverWithAckFilterer: CCIPReceiverWithAckFilterer{contract: contract}}, nil +} + +func NewCCIPReceiverWithAckCaller(address common.Address, caller bind.ContractCaller) (*CCIPReceiverWithAckCaller, error) { + contract, err := bindCCIPReceiverWithAck(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CCIPReceiverWithAckCaller{contract: contract}, nil +} + +func NewCCIPReceiverWithAckTransactor(address common.Address, transactor bind.ContractTransactor) (*CCIPReceiverWithAckTransactor, error) { + contract, err := bindCCIPReceiverWithAck(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CCIPReceiverWithAckTransactor{contract: contract}, nil +} + +func NewCCIPReceiverWithAckFilterer(address common.Address, filterer bind.ContractFilterer) (*CCIPReceiverWithAckFilterer, error) { + contract, err := bindCCIPReceiverWithAck(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CCIPReceiverWithAckFilterer{contract: contract}, nil +} + +func bindCCIPReceiverWithAck(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := CCIPReceiverWithAckMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CCIPReceiverWithAck.Contract.CCIPReceiverWithAckCaller.contract.Call(opts, result, method, params...) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.CCIPReceiverWithAckTransactor.contract.Transfer(opts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.CCIPReceiverWithAckTransactor.contract.Transact(opts, method, params...) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CCIPReceiverWithAck.Contract.contract.Call(opts, result, method, params...) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.contract.Transfer(opts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.contract.Transact(opts, method, params...) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCaller) ACKMESSAGEMAGICBYTES(opts *bind.CallOpts) ([]byte, error) { + var out []interface{} + err := _CCIPReceiverWithAck.contract.Call(opts, &out, "ACKMESSAGEMAGICBYTES") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) ACKMESSAGEMAGICBYTES() ([]byte, error) { + return _CCIPReceiverWithAck.Contract.ACKMESSAGEMAGICBYTES(&_CCIPReceiverWithAck.CallOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCallerSession) ACKMESSAGEMAGICBYTES() ([]byte, error) { + return _CCIPReceiverWithAck.Contract.ACKMESSAGEMAGICBYTES(&_CCIPReceiverWithAck.CallOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCaller) GetMessageContents(opts *bind.CallOpts, messageId [32]byte) (ClientAny2EVMMessage, error) { + var out []interface{} + err := _CCIPReceiverWithAck.contract.Call(opts, &out, "getMessageContents", messageId) + + if err != nil { + return *new(ClientAny2EVMMessage), err + } + + out0 := *abi.ConvertType(out[0], new(ClientAny2EVMMessage)).(*ClientAny2EVMMessage) + + return out0, err + +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) GetMessageContents(messageId [32]byte) (ClientAny2EVMMessage, error) { + return _CCIPReceiverWithAck.Contract.GetMessageContents(&_CCIPReceiverWithAck.CallOpts, messageId) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCallerSession) GetMessageContents(messageId [32]byte) (ClientAny2EVMMessage, error) { + return _CCIPReceiverWithAck.Contract.GetMessageContents(&_CCIPReceiverWithAck.CallOpts, messageId) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCaller) GetMessageStatus(opts *bind.CallOpts, messageId [32]byte) (*big.Int, error) { + var out []interface{} + err := _CCIPReceiverWithAck.contract.Call(opts, &out, "getMessageStatus", messageId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) GetMessageStatus(messageId [32]byte) (*big.Int, error) { + return _CCIPReceiverWithAck.Contract.GetMessageStatus(&_CCIPReceiverWithAck.CallOpts, messageId) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCallerSession) GetMessageStatus(messageId [32]byte) (*big.Int, error) { + return _CCIPReceiverWithAck.Contract.GetMessageStatus(&_CCIPReceiverWithAck.CallOpts, messageId) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCaller) GetRouter(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CCIPReceiverWithAck.contract.Call(opts, &out, "getRouter") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) GetRouter() (common.Address, error) { + return _CCIPReceiverWithAck.Contract.GetRouter(&_CCIPReceiverWithAck.CallOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCallerSession) GetRouter() (common.Address, error) { + return _CCIPReceiverWithAck.Contract.GetRouter(&_CCIPReceiverWithAck.CallOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCaller) IsApprovedSender(opts *bind.CallOpts, sourceChainSelector uint64, senderAddr []byte) (bool, error) { + var out []interface{} + err := _CCIPReceiverWithAck.contract.Call(opts, &out, "isApprovedSender", sourceChainSelector, senderAddr) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) IsApprovedSender(sourceChainSelector uint64, senderAddr []byte) (bool, error) { + return _CCIPReceiverWithAck.Contract.IsApprovedSender(&_CCIPReceiverWithAck.CallOpts, sourceChainSelector, senderAddr) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCallerSession) IsApprovedSender(sourceChainSelector uint64, senderAddr []byte) (bool, error) { + return _CCIPReceiverWithAck.Contract.IsApprovedSender(&_CCIPReceiverWithAck.CallOpts, sourceChainSelector, senderAddr) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CCIPReceiverWithAck.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) Owner() (common.Address, error) { + return _CCIPReceiverWithAck.Contract.Owner(&_CCIPReceiverWithAck.CallOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCallerSession) Owner() (common.Address, error) { + return _CCIPReceiverWithAck.Contract.Owner(&_CCIPReceiverWithAck.CallOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCaller) SChains(opts *bind.CallOpts, arg0 uint64) (SChains, + + error) { + var out []interface{} + err := _CCIPReceiverWithAck.contract.Call(opts, &out, "s_chains", arg0) + + outstruct := new(SChains) + if err != nil { + return *outstruct, err + } + + outstruct.Recipient = *abi.ConvertType(out[0], new([]byte)).(*[]byte) + outstruct.ExtraArgsBytes = *abi.ConvertType(out[1], new([]byte)).(*[]byte) + + return *outstruct, err + +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) SChains(arg0 uint64) (SChains, + + error) { + return _CCIPReceiverWithAck.Contract.SChains(&_CCIPReceiverWithAck.CallOpts, arg0) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCallerSession) SChains(arg0 uint64) (SChains, + + error) { + return _CCIPReceiverWithAck.Contract.SChains(&_CCIPReceiverWithAck.CallOpts, arg0) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCaller) SFeeToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CCIPReceiverWithAck.contract.Call(opts, &out, "s_feeToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) SFeeToken() (common.Address, error) { + return _CCIPReceiverWithAck.Contract.SFeeToken(&_CCIPReceiverWithAck.CallOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCallerSession) SFeeToken() (common.Address, error) { + return _CCIPReceiverWithAck.Contract.SFeeToken(&_CCIPReceiverWithAck.CallOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCaller) SMessageStatus(opts *bind.CallOpts, messageId [32]byte) (uint8, error) { + var out []interface{} + err := _CCIPReceiverWithAck.contract.Call(opts, &out, "s_messageStatus", messageId) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) SMessageStatus(messageId [32]byte) (uint8, error) { + return _CCIPReceiverWithAck.Contract.SMessageStatus(&_CCIPReceiverWithAck.CallOpts, messageId) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCallerSession) SMessageStatus(messageId [32]byte) (uint8, error) { + return _CCIPReceiverWithAck.Contract.SMessageStatus(&_CCIPReceiverWithAck.CallOpts, messageId) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _CCIPReceiverWithAck.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) TypeAndVersion() (string, error) { + return _CCIPReceiverWithAck.Contract.TypeAndVersion(&_CCIPReceiverWithAck.CallOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckCallerSession) TypeAndVersion() (string, error) { + return _CCIPReceiverWithAck.Contract.TypeAndVersion(&_CCIPReceiverWithAck.CallOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.Transact(opts, "acceptOwnership") +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) AcceptOwnership() (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.AcceptOwnership(&_CCIPReceiverWithAck.TransactOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.AcceptOwnership(&_CCIPReceiverWithAck.TransactOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) CcipReceive(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.Transact(opts, "ccipReceive", message) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) CcipReceive(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.CcipReceive(&_CCIPReceiverWithAck.TransactOpts, message) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) CcipReceive(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.CcipReceive(&_CCIPReceiverWithAck.TransactOpts, message) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) DisableChain(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.Transact(opts, "disableChain", chainSelector) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) DisableChain(chainSelector uint64) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.DisableChain(&_CCIPReceiverWithAck.TransactOpts, chainSelector) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) DisableChain(chainSelector uint64) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.DisableChain(&_CCIPReceiverWithAck.TransactOpts, chainSelector) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) EnableChain(opts *bind.TransactOpts, chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.Transact(opts, "enableChain", chainSelector, recipient, _extraArgsBytes) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) EnableChain(chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.EnableChain(&_CCIPReceiverWithAck.TransactOpts, chainSelector, recipient, _extraArgsBytes) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) EnableChain(chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.EnableChain(&_CCIPReceiverWithAck.TransactOpts, chainSelector, recipient, _extraArgsBytes) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) ModifyFeeToken(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.Transact(opts, "modifyFeeToken", token) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) ModifyFeeToken(token common.Address) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.ModifyFeeToken(&_CCIPReceiverWithAck.TransactOpts, token) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) ModifyFeeToken(token common.Address) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.ModifyFeeToken(&_CCIPReceiverWithAck.TransactOpts, token) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) ProcessMessage(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.Transact(opts, "processMessage", message) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) ProcessMessage(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.ProcessMessage(&_CCIPReceiverWithAck.TransactOpts, message) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) ProcessMessage(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.ProcessMessage(&_CCIPReceiverWithAck.TransactOpts, message) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) RetryFailedMessage(opts *bind.TransactOpts, messageId [32]byte) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.Transact(opts, "retryFailedMessage", messageId) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) RetryFailedMessage(messageId [32]byte) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.RetryFailedMessage(&_CCIPReceiverWithAck.TransactOpts, messageId) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) RetryFailedMessage(messageId [32]byte) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.RetryFailedMessage(&_CCIPReceiverWithAck.TransactOpts, messageId) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) SetSimRevert(opts *bind.TransactOpts, simRevert bool) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.Transact(opts, "setSimRevert", simRevert) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) SetSimRevert(simRevert bool) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.SetSimRevert(&_CCIPReceiverWithAck.TransactOpts, simRevert) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) SetSimRevert(simRevert bool) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.SetSimRevert(&_CCIPReceiverWithAck.TransactOpts, simRevert) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.Transact(opts, "transferOwnership", to) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.TransferOwnership(&_CCIPReceiverWithAck.TransactOpts, to) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.TransferOwnership(&_CCIPReceiverWithAck.TransactOpts, to) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) UpdateApprovedSenders(opts *bind.TransactOpts, adds []ICCIPClientBaseapprovedSenderUpdate, removes []ICCIPClientBaseapprovedSenderUpdate) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.Transact(opts, "updateApprovedSenders", adds, removes) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) UpdateApprovedSenders(adds []ICCIPClientBaseapprovedSenderUpdate, removes []ICCIPClientBaseapprovedSenderUpdate) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.UpdateApprovedSenders(&_CCIPReceiverWithAck.TransactOpts, adds, removes) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) UpdateApprovedSenders(adds []ICCIPClientBaseapprovedSenderUpdate, removes []ICCIPClientBaseapprovedSenderUpdate) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.UpdateApprovedSenders(&_CCIPReceiverWithAck.TransactOpts, adds, removes) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) WithdrawNativeToken(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.Transact(opts, "withdrawNativeToken", to, amount) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) WithdrawNativeToken(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.WithdrawNativeToken(&_CCIPReceiverWithAck.TransactOpts, to, amount) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) WithdrawNativeToken(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.WithdrawNativeToken(&_CCIPReceiverWithAck.TransactOpts, to, amount) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) WithdrawTokens(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.Transact(opts, "withdrawTokens", token, to, amount) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) WithdrawTokens(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.WithdrawTokens(&_CCIPReceiverWithAck.TransactOpts, token, to, amount) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) WithdrawTokens(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.WithdrawTokens(&_CCIPReceiverWithAck.TransactOpts, token, to, amount) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.RawTransact(opts, calldata) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.Fallback(&_CCIPReceiverWithAck.TransactOpts, calldata) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.Fallback(&_CCIPReceiverWithAck.TransactOpts, calldata) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPReceiverWithAck.contract.RawTransact(opts, nil) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckSession) Receive() (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.Receive(&_CCIPReceiverWithAck.TransactOpts) +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckTransactorSession) Receive() (*types.Transaction, error) { + return _CCIPReceiverWithAck.Contract.Receive(&_CCIPReceiverWithAck.TransactOpts) +} + +type CCIPReceiverWithAckFeeTokenModifiedIterator struct { + Event *CCIPReceiverWithAckFeeTokenModified + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverWithAckFeeTokenModifiedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckFeeTokenModified) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckFeeTokenModified) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverWithAckFeeTokenModifiedIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverWithAckFeeTokenModifiedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverWithAckFeeTokenModified struct { + OldToken common.Address + NewToken common.Address + Raw types.Log +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) FilterFeeTokenModified(opts *bind.FilterOpts, oldToken []common.Address, newToken []common.Address) (*CCIPReceiverWithAckFeeTokenModifiedIterator, error) { + + var oldTokenRule []interface{} + for _, oldTokenItem := range oldToken { + oldTokenRule = append(oldTokenRule, oldTokenItem) + } + var newTokenRule []interface{} + for _, newTokenItem := range newToken { + newTokenRule = append(newTokenRule, newTokenItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.FilterLogs(opts, "FeeTokenModified", oldTokenRule, newTokenRule) + if err != nil { + return nil, err + } + return &CCIPReceiverWithAckFeeTokenModifiedIterator{contract: _CCIPReceiverWithAck.contract, event: "FeeTokenModified", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) WatchFeeTokenModified(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckFeeTokenModified, oldToken []common.Address, newToken []common.Address) (event.Subscription, error) { + + var oldTokenRule []interface{} + for _, oldTokenItem := range oldToken { + oldTokenRule = append(oldTokenRule, oldTokenItem) + } + var newTokenRule []interface{} + for _, newTokenItem := range newToken { + newTokenRule = append(newTokenRule, newTokenItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.WatchLogs(opts, "FeeTokenModified", oldTokenRule, newTokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverWithAckFeeTokenModified) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "FeeTokenModified", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) ParseFeeTokenModified(log types.Log) (*CCIPReceiverWithAckFeeTokenModified, error) { + event := new(CCIPReceiverWithAckFeeTokenModified) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "FeeTokenModified", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverWithAckMessageAckReceivedIterator struct { + Event *CCIPReceiverWithAckMessageAckReceived + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverWithAckMessageAckReceivedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckMessageAckReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckMessageAckReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverWithAckMessageAckReceivedIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverWithAckMessageAckReceivedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverWithAckMessageAckReceived struct { + Arg0 [32]byte + Raw types.Log +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) FilterMessageAckReceived(opts *bind.FilterOpts) (*CCIPReceiverWithAckMessageAckReceivedIterator, error) { + + logs, sub, err := _CCIPReceiverWithAck.contract.FilterLogs(opts, "MessageAckReceived") + if err != nil { + return nil, err + } + return &CCIPReceiverWithAckMessageAckReceivedIterator{contract: _CCIPReceiverWithAck.contract, event: "MessageAckReceived", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) WatchMessageAckReceived(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckMessageAckReceived) (event.Subscription, error) { + + logs, sub, err := _CCIPReceiverWithAck.contract.WatchLogs(opts, "MessageAckReceived") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverWithAckMessageAckReceived) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "MessageAckReceived", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) ParseMessageAckReceived(log types.Log) (*CCIPReceiverWithAckMessageAckReceived, error) { + event := new(CCIPReceiverWithAckMessageAckReceived) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "MessageAckReceived", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverWithAckMessageAckSentIterator struct { + Event *CCIPReceiverWithAckMessageAckSent + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverWithAckMessageAckSentIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckMessageAckSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckMessageAckSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverWithAckMessageAckSentIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverWithAckMessageAckSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverWithAckMessageAckSent struct { + IncomingMessageId [32]byte + Raw types.Log +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) FilterMessageAckSent(opts *bind.FilterOpts) (*CCIPReceiverWithAckMessageAckSentIterator, error) { + + logs, sub, err := _CCIPReceiverWithAck.contract.FilterLogs(opts, "MessageAckSent") + if err != nil { + return nil, err + } + return &CCIPReceiverWithAckMessageAckSentIterator{contract: _CCIPReceiverWithAck.contract, event: "MessageAckSent", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) WatchMessageAckSent(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckMessageAckSent) (event.Subscription, error) { + + logs, sub, err := _CCIPReceiverWithAck.contract.WatchLogs(opts, "MessageAckSent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverWithAckMessageAckSent) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "MessageAckSent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) ParseMessageAckSent(log types.Log) (*CCIPReceiverWithAckMessageAckSent, error) { + event := new(CCIPReceiverWithAckMessageAckSent) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "MessageAckSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverWithAckMessageFailedIterator struct { + Event *CCIPReceiverWithAckMessageFailed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverWithAckMessageFailedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckMessageFailed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckMessageFailed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverWithAckMessageFailedIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverWithAckMessageFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverWithAckMessageFailed struct { + MessageId [32]byte + Reason []byte + Raw types.Log +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) FilterMessageFailed(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverWithAckMessageFailedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.FilterLogs(opts, "MessageFailed", messageIdRule) + if err != nil { + return nil, err + } + return &CCIPReceiverWithAckMessageFailedIterator{contract: _CCIPReceiverWithAck.contract, event: "MessageFailed", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) WatchMessageFailed(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckMessageFailed, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.WatchLogs(opts, "MessageFailed", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverWithAckMessageFailed) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "MessageFailed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) ParseMessageFailed(log types.Log) (*CCIPReceiverWithAckMessageFailed, error) { + event := new(CCIPReceiverWithAckMessageFailed) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "MessageFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverWithAckMessageRecoveredIterator struct { + Event *CCIPReceiverWithAckMessageRecovered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverWithAckMessageRecoveredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckMessageRecovered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckMessageRecovered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverWithAckMessageRecoveredIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverWithAckMessageRecoveredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverWithAckMessageRecovered struct { + MessageId [32]byte + Raw types.Log +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) FilterMessageRecovered(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverWithAckMessageRecoveredIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.FilterLogs(opts, "MessageRecovered", messageIdRule) + if err != nil { + return nil, err + } + return &CCIPReceiverWithAckMessageRecoveredIterator{contract: _CCIPReceiverWithAck.contract, event: "MessageRecovered", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) WatchMessageRecovered(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckMessageRecovered, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.WatchLogs(opts, "MessageRecovered", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverWithAckMessageRecovered) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "MessageRecovered", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) ParseMessageRecovered(log types.Log) (*CCIPReceiverWithAckMessageRecovered, error) { + event := new(CCIPReceiverWithAckMessageRecovered) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "MessageRecovered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverWithAckMessageSentIterator struct { + Event *CCIPReceiverWithAckMessageSent + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverWithAckMessageSentIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverWithAckMessageSentIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverWithAckMessageSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverWithAckMessageSent struct { + IncomingMessageId [32]byte + ACKMessageId [32]byte + Raw types.Log +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) FilterMessageSent(opts *bind.FilterOpts, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (*CCIPReceiverWithAckMessageSentIterator, error) { + + var incomingMessageIdRule []interface{} + for _, incomingMessageIdItem := range incomingMessageId { + incomingMessageIdRule = append(incomingMessageIdRule, incomingMessageIdItem) + } + var ACKMessageIdRule []interface{} + for _, ACKMessageIdItem := range ACKMessageId { + ACKMessageIdRule = append(ACKMessageIdRule, ACKMessageIdItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.FilterLogs(opts, "MessageSent", incomingMessageIdRule, ACKMessageIdRule) + if err != nil { + return nil, err + } + return &CCIPReceiverWithAckMessageSentIterator{contract: _CCIPReceiverWithAck.contract, event: "MessageSent", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckMessageSent, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (event.Subscription, error) { + + var incomingMessageIdRule []interface{} + for _, incomingMessageIdItem := range incomingMessageId { + incomingMessageIdRule = append(incomingMessageIdRule, incomingMessageIdItem) + } + var ACKMessageIdRule []interface{} + for _, ACKMessageIdItem := range ACKMessageId { + ACKMessageIdRule = append(ACKMessageIdRule, ACKMessageIdItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.WatchLogs(opts, "MessageSent", incomingMessageIdRule, ACKMessageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverWithAckMessageSent) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "MessageSent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) ParseMessageSent(log types.Log) (*CCIPReceiverWithAckMessageSent, error) { + event := new(CCIPReceiverWithAckMessageSent) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "MessageSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverWithAckMessageSucceededIterator struct { + Event *CCIPReceiverWithAckMessageSucceeded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverWithAckMessageSucceededIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckMessageSucceeded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckMessageSucceeded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverWithAckMessageSucceededIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverWithAckMessageSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverWithAckMessageSucceeded struct { + MessageId [32]byte + Raw types.Log +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) FilterMessageSucceeded(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverWithAckMessageSucceededIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.FilterLogs(opts, "MessageSucceeded", messageIdRule) + if err != nil { + return nil, err + } + return &CCIPReceiverWithAckMessageSucceededIterator{contract: _CCIPReceiverWithAck.contract, event: "MessageSucceeded", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) WatchMessageSucceeded(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckMessageSucceeded, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.WatchLogs(opts, "MessageSucceeded", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverWithAckMessageSucceeded) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "MessageSucceeded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) ParseMessageSucceeded(log types.Log) (*CCIPReceiverWithAckMessageSucceeded, error) { + event := new(CCIPReceiverWithAckMessageSucceeded) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "MessageSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverWithAckOwnershipTransferRequestedIterator struct { + Event *CCIPReceiverWithAckOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverWithAckOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverWithAckOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverWithAckOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverWithAckOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPReceiverWithAckOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &CCIPReceiverWithAckOwnershipTransferRequestedIterator{contract: _CCIPReceiverWithAck.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverWithAckOwnershipTransferRequested) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) ParseOwnershipTransferRequested(log types.Log) (*CCIPReceiverWithAckOwnershipTransferRequested, error) { + event := new(CCIPReceiverWithAckOwnershipTransferRequested) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPReceiverWithAckOwnershipTransferredIterator struct { + Event *CCIPReceiverWithAckOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPReceiverWithAckOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPReceiverWithAckOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPReceiverWithAckOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *CCIPReceiverWithAckOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPReceiverWithAckOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPReceiverWithAckOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &CCIPReceiverWithAckOwnershipTransferredIterator{contract: _CCIPReceiverWithAck.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPReceiverWithAck.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPReceiverWithAckOwnershipTransferred) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAckFilterer) ParseOwnershipTransferred(log types.Log) (*CCIPReceiverWithAckOwnershipTransferred, error) { + event := new(CCIPReceiverWithAckOwnershipTransferred) + if err := _CCIPReceiverWithAck.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type SChains struct { + Recipient []byte + ExtraArgsBytes []byte +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAck) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _CCIPReceiverWithAck.abi.Events["FeeTokenModified"].ID: + return _CCIPReceiverWithAck.ParseFeeTokenModified(log) + case _CCIPReceiverWithAck.abi.Events["MessageAckReceived"].ID: + return _CCIPReceiverWithAck.ParseMessageAckReceived(log) + case _CCIPReceiverWithAck.abi.Events["MessageAckSent"].ID: + return _CCIPReceiverWithAck.ParseMessageAckSent(log) + case _CCIPReceiverWithAck.abi.Events["MessageFailed"].ID: + return _CCIPReceiverWithAck.ParseMessageFailed(log) + case _CCIPReceiverWithAck.abi.Events["MessageRecovered"].ID: + return _CCIPReceiverWithAck.ParseMessageRecovered(log) + case _CCIPReceiverWithAck.abi.Events["MessageSent"].ID: + return _CCIPReceiverWithAck.ParseMessageSent(log) + case _CCIPReceiverWithAck.abi.Events["MessageSucceeded"].ID: + return _CCIPReceiverWithAck.ParseMessageSucceeded(log) + case _CCIPReceiverWithAck.abi.Events["OwnershipTransferRequested"].ID: + return _CCIPReceiverWithAck.ParseOwnershipTransferRequested(log) + case _CCIPReceiverWithAck.abi.Events["OwnershipTransferred"].ID: + return _CCIPReceiverWithAck.ParseOwnershipTransferred(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (CCIPReceiverWithAckFeeTokenModified) Topic() common.Hash { + return common.HexToHash("0x4a1cb6b940121ea2ba30fb9b494035cbfe2d4b6b080db8b502150410bef7eb4e") +} + +func (CCIPReceiverWithAckMessageAckReceived) Topic() common.Hash { + return common.HexToHash("0xef0cb160d3dc564cde61ae97d9981f9c4d92ace727a2ec202b18b223ea832a79") +} + +func (CCIPReceiverWithAckMessageAckSent) Topic() common.Hash { + return common.HexToHash("0x75944f95ba0be568cb30faeb0ef135cb73d07006939da29722d670a97f5c5b26") +} + +func (CCIPReceiverWithAckMessageFailed) Topic() common.Hash { + return common.HexToHash("0x55bc02a9ef6f146737edeeb425738006f67f077e7138de3bf84a15bde1a5b56f") +} + +func (CCIPReceiverWithAckMessageRecovered) Topic() common.Hash { + return common.HexToHash("0xef3bf8c64bc480286c4f3503b870ceb23e648d2d902e31fb7bb46680da6de8ad") +} + +func (CCIPReceiverWithAckMessageSent) Topic() common.Hash { + return common.HexToHash("0x9102b9031c3c59d8320bf14d84d7d7a3434366b91032fad1c87579cfc62b2372") +} + +func (CCIPReceiverWithAckMessageSucceeded) Topic() common.Hash { + return common.HexToHash("0xdf6958669026659bac75ba986685e11a7d271284989f565f2802522663e9a70f") +} + +func (CCIPReceiverWithAckOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (CCIPReceiverWithAckOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (_CCIPReceiverWithAck *CCIPReceiverWithAck) Address() common.Address { + return _CCIPReceiverWithAck.address +} + +type CCIPReceiverWithAckInterface interface { + ACKMESSAGEMAGICBYTES(opts *bind.CallOpts) ([]byte, error) + + GetMessageContents(opts *bind.CallOpts, messageId [32]byte) (ClientAny2EVMMessage, error) + + GetMessageStatus(opts *bind.CallOpts, messageId [32]byte) (*big.Int, error) + + GetRouter(opts *bind.CallOpts) (common.Address, error) + + IsApprovedSender(opts *bind.CallOpts, sourceChainSelector uint64, senderAddr []byte) (bool, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + SChains(opts *bind.CallOpts, arg0 uint64) (SChains, + + error) + + SFeeToken(opts *bind.CallOpts) (common.Address, error) + + SMessageStatus(opts *bind.CallOpts, messageId [32]byte) (uint8, error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + CcipReceive(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) + + DisableChain(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) + + EnableChain(opts *bind.TransactOpts, chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) + + ModifyFeeToken(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) + + ProcessMessage(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) + + RetryFailedMessage(opts *bind.TransactOpts, messageId [32]byte) (*types.Transaction, error) + + SetSimRevert(opts *bind.TransactOpts, simRevert bool) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + UpdateApprovedSenders(opts *bind.TransactOpts, adds []ICCIPClientBaseapprovedSenderUpdate, removes []ICCIPClientBaseapprovedSenderUpdate) (*types.Transaction, error) + + WithdrawNativeToken(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) + + WithdrawTokens(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) + + Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) + + Receive(opts *bind.TransactOpts) (*types.Transaction, error) + + FilterFeeTokenModified(opts *bind.FilterOpts, oldToken []common.Address, newToken []common.Address) (*CCIPReceiverWithAckFeeTokenModifiedIterator, error) + + WatchFeeTokenModified(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckFeeTokenModified, oldToken []common.Address, newToken []common.Address) (event.Subscription, error) + + ParseFeeTokenModified(log types.Log) (*CCIPReceiverWithAckFeeTokenModified, error) + + FilterMessageAckReceived(opts *bind.FilterOpts) (*CCIPReceiverWithAckMessageAckReceivedIterator, error) + + WatchMessageAckReceived(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckMessageAckReceived) (event.Subscription, error) + + ParseMessageAckReceived(log types.Log) (*CCIPReceiverWithAckMessageAckReceived, error) + + FilterMessageAckSent(opts *bind.FilterOpts) (*CCIPReceiverWithAckMessageAckSentIterator, error) + + WatchMessageAckSent(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckMessageAckSent) (event.Subscription, error) + + ParseMessageAckSent(log types.Log) (*CCIPReceiverWithAckMessageAckSent, error) + + FilterMessageFailed(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverWithAckMessageFailedIterator, error) + + WatchMessageFailed(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckMessageFailed, messageId [][32]byte) (event.Subscription, error) + + ParseMessageFailed(log types.Log) (*CCIPReceiverWithAckMessageFailed, error) + + FilterMessageRecovered(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverWithAckMessageRecoveredIterator, error) + + WatchMessageRecovered(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckMessageRecovered, messageId [][32]byte) (event.Subscription, error) + + ParseMessageRecovered(log types.Log) (*CCIPReceiverWithAckMessageRecovered, error) + + FilterMessageSent(opts *bind.FilterOpts, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (*CCIPReceiverWithAckMessageSentIterator, error) + + WatchMessageSent(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckMessageSent, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (event.Subscription, error) + + ParseMessageSent(log types.Log) (*CCIPReceiverWithAckMessageSent, error) + + FilterMessageSucceeded(opts *bind.FilterOpts, messageId [][32]byte) (*CCIPReceiverWithAckMessageSucceededIterator, error) + + WatchMessageSucceeded(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckMessageSucceeded, messageId [][32]byte) (event.Subscription, error) + + ParseMessageSucceeded(log types.Log) (*CCIPReceiverWithAckMessageSucceeded, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPReceiverWithAckOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*CCIPReceiverWithAckOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPReceiverWithAckOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPReceiverWithAckOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*CCIPReceiverWithAckOwnershipTransferred, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/ccip/generated/ccipSender/ccipSender.go b/core/gethwrappers/ccip/generated/ccipSender/ccipSender.go new file mode 100644 index 0000000000..8ed77d40ce --- /dev/null +++ b/core/gethwrappers/ccip/generated/ccipSender/ccipSender.go @@ -0,0 +1,1017 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ccipSender + +import ( + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +type CCIPClientBaseApprovedSenderUpdate struct { + DestChainSelector uint64 + Sender []byte +} + +type ClientEVMTokenAmount struct { + Token common.Address + Amount *big.Int +} + +var CCIPSenderMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InsufficientNativeFeeTokenAmount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"}],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"InvalidRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"name\":\"InvalidSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"ccipSend\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"disableChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_extraArgsBytes\",\"type\":\"bytes\"}],\"name\":\"enableChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"senderAddr\",\"type\":\"bytes\"}],\"name\":\"isApprovedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"s_chainConfigs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraArgsBytes\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPClientBase.ApprovedSenderUpdate[]\",\"name\":\"adds\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPClientBase.ApprovedSenderUpdate[]\",\"name\":\"removes\",\"type\":\"tuple[]\"}],\"name\":\"updateApprovedSenders\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawNativeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60a06040523480156200001157600080fd5b506040516200219c3803806200219c8339810160408190526200003491620001a8565b8033806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620000fd565b5050506001600160a01b038116620000ea576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b031660805250620001da565b336001600160a01b03821603620001575760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620001bb57600080fd5b81516001600160a01b0381168114620001d357600080fd5b9392505050565b608051611f8a620002126000396000818161028401528181610b8d01528181610c5601528181610d2a0152610d660152611f8a6000f3fe6080604052600436106100d65760003560e01c806379ba50971161007f578063b0f479a111610059578063b0f479a114610275578063d8469e40146102a8578063effde240146102c8578063f2fde38b146102e957600080fd5b806379ba5097146101f45780638462a2b9146102095780638da5cb5b1461022957600080fd5b806341eade46116100b057806341eade4614610192578063536c6bfa146101b45780635e35359e146101d457600080fd5b80630e958d6b146100e2578063181f5a771461011757806335f170ef1461016357600080fd5b366100dd57005b600080fd5b3480156100ee57600080fd5b506101026100fd3660046116e6565b610309565b60405190151581526020015b60405180910390f35b34801561012357600080fd5b50604080518082018252601481527f4343495053656e64657220312e302e302d6465760000000000000000000000006020820152905161010e91906117a7565b34801561016f57600080fd5b5061018361017e3660046117c1565b610354565b60405161010e939291906117dc565b34801561019e57600080fd5b506101b26101ad3660046117c1565b61048b565b005b3480156101c057600080fd5b506101b26101cf366004611835565b6104d6565b3480156101e057600080fd5b506101b26101ef36600461186c565b6104ec565b34801561020057600080fd5b506101b261051a565b34801561021557600080fd5b506101b26102243660046118f2565b61061c565b34801561023557600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010e565b34801561028157600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610250565b3480156102b457600080fd5b506101b26102c336600461195e565b6107fd565b6102db6102d63660046119df565b61087e565b60405190815260200161010e565b3480156102f557600080fd5b506101b2610304366004611aa0565b610e49565b67ffffffffffffffff831660009081526002602052604080822090516003909101906103389085908590611abd565b9081526040519081900360200190205460ff1690509392505050565b6002602052600090815260409020805460018201805460ff909216929161037a90611acd565b80601f01602080910402602001604051908101604052809291908181526020018280546103a690611acd565b80156103f35780601f106103c8576101008083540402835291602001916103f3565b820191906000526020600020905b8154815290600101906020018083116103d657829003601f168201915b50505050509080600201805461040890611acd565b80601f016020809104026020016040519081016040528092919081815260200182805461043490611acd565b80156104815780601f1061045657610100808354040283529160200191610481565b820191906000526020600020905b81548152906001019060200180831161046457829003601f168201915b5050505050905083565b610493610e5d565b67ffffffffffffffff16600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6104de610e5d565b6104e88282610ee0565b5050565b6104f4610e5d565b61051573ffffffffffffffffffffffffffffffffffffffff8416838361103a565b505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146105a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610624610e5d565b60005b81811015610707576002600084848481811061064557610645611b20565b90506020028101906106579190611b4f565b6106659060208101906117c1565b67ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060030183838381811061069c5761069c611b20565b90506020028101906106ae9190611b4f565b6106bc906020810190611b8d565b6040516106ca929190611abd565b90815260405190819003602001902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600101610627565b5060005b838110156107f65760016002600087878581811061072b5761072b611b20565b905060200281019061073d9190611b4f565b61074b9060208101906117c1565b67ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060030186868481811061078257610782611b20565b90506020028101906107949190611b4f565b6107a2906020810190611b8d565b6040516107b0929190611abd565b90815260405190819003602001902080549115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090921691909117905560010161070b565b5050505050565b610805610e5d565b67ffffffffffffffff851660009081526002602052604090206001810161082d858783611c69565b5081156108455760028101610843838583611c69565b505b805460ff16156108765780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681555b505050505050565b67ffffffffffffffff86166000908152600260205260408120600181018054899291906108aa90611acd565b159050806108b95750805460ff165b156108fc576040517fd79f2ea400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff83166004820152602401610597565b6040805160a08101825267ffffffffffffffff8b1660009081526002602052918220600101805482919061092f90611acd565b80601f016020809104026020016040519081016040528092919081815260200182805461095b90611acd565b80156109a85780601f1061097d576101008083540402835291602001916109a8565b820191906000526020600020905b81548152906001019060200180831161098b57829003601f168201915b5050505050815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250506040805160208e8102820181019092528d815293810193928e92508d9182919085015b82821015610a3857610a2960408302860136819003810190611d83565b81526020019060010190610a0c565b505050505081526020018673ffffffffffffffffffffffffffffffffffffffff168152602001600260008d67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002018054610a9390611acd565b80601f0160208091040260200160405190810160405280929190818152602001828054610abf90611acd565b8015610b0c5780601f10610ae157610100808354040283529160200191610b0c565b820191906000526020600020905b815481529060010190602001808311610aef57829003601f168201915b5050505050815250905060005b88811015610c1557610b8833308c8c85818110610b3857610b38611b20565b905060400201602001358d8d86818110610b5457610b54611b20565b610b6a9260206040909202019081019150611aa0565b73ffffffffffffffffffffffffffffffffffffffff1692919061110e565b610c0d7f00000000000000000000000000000000000000000000000000000000000000008b8b84818110610bbe57610bbe611b20565b905060400201602001358c8c85818110610bda57610bda611b20565b610bf09260206040909202019081019150611aa0565b73ffffffffffffffffffffffffffffffffffffffff169190611172565b600101610b19565b506040517f20487ded00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906320487ded90610c8d908e908690600401611ddb565b602060405180830381865afa158015610caa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cce9190611ef0565b905073ffffffffffffffffffffffffffffffffffffffff861615610d4f57610d0e73ffffffffffffffffffffffffffffffffffffffff871633308461110e565b610d4f73ffffffffffffffffffffffffffffffffffffffff87167f000000000000000000000000000000000000000000000000000000000000000083611172565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116906396f4e9f990881615610d9c576000610d9e565b825b8d856040518463ffffffff1660e01b8152600401610dbd929190611ddb565b60206040518083038185885af1158015610ddb573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e009190611ef0565b94507f54791b38f3859327992a1ca0590ad3c0f08feba98d1a4f56ab0dca74d203392a85604051610e3391815260200190565b60405180910390a1505050509695505050505050565b610e51610e5d565b610e5a81611270565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ede576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610597565b565b80471015610f4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610597565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610fa4576040519150601f19603f3d011682016040523d82523d6000602084013e610fa9565b606091505b5050905080610515576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610597565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526105159084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611365565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261116c9085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161108c565b50505050565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156111e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120d9190611ef0565b6112179190611f09565b60405173ffffffffffffffffffffffffffffffffffffffff851660248201526044810182905290915061116c9085907f095ea7b3000000000000000000000000000000000000000000000000000000009060640161108c565b3373ffffffffffffffffffffffffffffffffffffffff8216036112ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610597565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006113c7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166114719092919063ffffffff16565b80519091501561051557808060200190518101906113e59190611f49565b610515576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610597565b60606114808484600085611488565b949350505050565b60608247101561151a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610597565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516115439190611f6b565b60006040518083038185875af1925050503d8060008114611580576040519150601f19603f3d011682016040523d82523d6000602084013e611585565b606091505b5091509150611596878383876115a1565b979650505050505050565b606083156116375782516000036116305773ffffffffffffffffffffffffffffffffffffffff85163b611630576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610597565b5081611480565b611480838381511561164c5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059791906117a7565b803567ffffffffffffffff8116811461169857600080fd5b919050565b60008083601f8401126116af57600080fd5b50813567ffffffffffffffff8111156116c757600080fd5b6020830191508360208285010111156116df57600080fd5b9250929050565b6000806000604084860312156116fb57600080fd5b61170484611680565b9250602084013567ffffffffffffffff81111561172057600080fd5b61172c8682870161169d565b9497909650939450505050565b60005b8381101561175457818101518382015260200161173c565b50506000910152565b60008151808452611775816020860160208601611739565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006117ba602083018461175d565b9392505050565b6000602082840312156117d357600080fd5b6117ba82611680565b83151581526060602082015260006117f7606083018561175d565b8281036040840152611809818561175d565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610e5a57600080fd5b6000806040838503121561184857600080fd5b823561185381611813565b946020939093013593505050565b803561169881611813565b60008060006060848603121561188157600080fd5b833561188c81611813565b9250602084013561189c81611813565b929592945050506040919091013590565b60008083601f8401126118bf57600080fd5b50813567ffffffffffffffff8111156118d757600080fd5b6020830191508360208260051b85010111156116df57600080fd5b6000806000806040858703121561190857600080fd5b843567ffffffffffffffff8082111561192057600080fd5b61192c888389016118ad565b9096509450602087013591508082111561194557600080fd5b50611952878288016118ad565b95989497509550505050565b60008060008060006060868803121561197657600080fd5b61197f86611680565b9450602086013567ffffffffffffffff8082111561199c57600080fd5b6119a889838a0161169d565b909650945060408801359150808211156119c157600080fd5b506119ce8882890161169d565b969995985093965092949392505050565b600080600080600080608087890312156119f857600080fd5b611a0187611680565b9550602087013567ffffffffffffffff80821115611a1e57600080fd5b818901915089601f830112611a3257600080fd5b813581811115611a4157600080fd5b8a60208260061b8501011115611a5657600080fd5b602083019750809650506040890135915080821115611a7457600080fd5b50611a8189828a0161169d565b9094509250611a94905060608801611861565b90509295509295509295565b600060208284031215611ab257600080fd5b81356117ba81611813565b8183823760009101908152919050565b600181811c90821680611ae157607f821691505b602082108103611b1a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112611b8357600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611bc257600080fd5b83018035915067ffffffffffffffff821115611bdd57600080fd5b6020019150368190038213156116df57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f821115610515576000816000526020600020601f850160051c81016020861015611c4a5750805b601f850160051c820191505b8181101561087657828155600101611c56565b67ffffffffffffffff831115611c8157611c81611bf2565b611c9583611c8f8354611acd565b83611c21565b6000601f841160018114611ce75760008515611cb15750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b1783556107f6565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015611d365786850135825560209485019460019092019101611d16565b5086821015611d71577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060408284031215611d9557600080fd5b6040516040810181811067ffffffffffffffff82111715611db857611db8611bf2565b6040528235611dc681611813565b81526020928301359281019290925250919050565b6000604067ffffffffffffffff851683526020604081850152845160a06040860152611e0a60e086018261175d565b9050818601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc080878403016060880152611e45838361175d565b6040890151888203830160808a01528051808352908601945060009350908501905b80841015611ea6578451805173ffffffffffffffffffffffffffffffffffffffff16835286015186830152938501936001939093019290860190611e67565b50606089015173ffffffffffffffffffffffffffffffffffffffff1660a08901526080890151888203830160c08a01529550611ee2818761175d565b9a9950505050505050505050565b600060208284031215611f0257600080fd5b5051919050565b80820180821115611f43577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b600060208284031215611f5b57600080fd5b815180151581146117ba57600080fd5b60008251611b8381846020870161173956fea164736f6c6343000818000a", +} + +var CCIPSenderABI = CCIPSenderMetaData.ABI + +var CCIPSenderBin = CCIPSenderMetaData.Bin + +func DeployCCIPSender(auth *bind.TransactOpts, backend bind.ContractBackend, router common.Address) (common.Address, *types.Transaction, *CCIPSender, error) { + parsed, err := CCIPSenderMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(CCIPSenderBin), backend, router) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &CCIPSender{address: address, abi: *parsed, CCIPSenderCaller: CCIPSenderCaller{contract: contract}, CCIPSenderTransactor: CCIPSenderTransactor{contract: contract}, CCIPSenderFilterer: CCIPSenderFilterer{contract: contract}}, nil +} + +type CCIPSender struct { + address common.Address + abi abi.ABI + CCIPSenderCaller + CCIPSenderTransactor + CCIPSenderFilterer +} + +type CCIPSenderCaller struct { + contract *bind.BoundContract +} + +type CCIPSenderTransactor struct { + contract *bind.BoundContract +} + +type CCIPSenderFilterer struct { + contract *bind.BoundContract +} + +type CCIPSenderSession struct { + Contract *CCIPSender + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type CCIPSenderCallerSession struct { + Contract *CCIPSenderCaller + CallOpts bind.CallOpts +} + +type CCIPSenderTransactorSession struct { + Contract *CCIPSenderTransactor + TransactOpts bind.TransactOpts +} + +type CCIPSenderRaw struct { + Contract *CCIPSender +} + +type CCIPSenderCallerRaw struct { + Contract *CCIPSenderCaller +} + +type CCIPSenderTransactorRaw struct { + Contract *CCIPSenderTransactor +} + +func NewCCIPSender(address common.Address, backend bind.ContractBackend) (*CCIPSender, error) { + abi, err := abi.JSON(strings.NewReader(CCIPSenderABI)) + if err != nil { + return nil, err + } + contract, err := bindCCIPSender(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &CCIPSender{address: address, abi: abi, CCIPSenderCaller: CCIPSenderCaller{contract: contract}, CCIPSenderTransactor: CCIPSenderTransactor{contract: contract}, CCIPSenderFilterer: CCIPSenderFilterer{contract: contract}}, nil +} + +func NewCCIPSenderCaller(address common.Address, caller bind.ContractCaller) (*CCIPSenderCaller, error) { + contract, err := bindCCIPSender(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CCIPSenderCaller{contract: contract}, nil +} + +func NewCCIPSenderTransactor(address common.Address, transactor bind.ContractTransactor) (*CCIPSenderTransactor, error) { + contract, err := bindCCIPSender(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CCIPSenderTransactor{contract: contract}, nil +} + +func NewCCIPSenderFilterer(address common.Address, filterer bind.ContractFilterer) (*CCIPSenderFilterer, error) { + contract, err := bindCCIPSender(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CCIPSenderFilterer{contract: contract}, nil +} + +func bindCCIPSender(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := CCIPSenderMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_CCIPSender *CCIPSenderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CCIPSender.Contract.CCIPSenderCaller.contract.Call(opts, result, method, params...) +} + +func (_CCIPSender *CCIPSenderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPSender.Contract.CCIPSenderTransactor.contract.Transfer(opts) +} + +func (_CCIPSender *CCIPSenderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CCIPSender.Contract.CCIPSenderTransactor.contract.Transact(opts, method, params...) +} + +func (_CCIPSender *CCIPSenderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CCIPSender.Contract.contract.Call(opts, result, method, params...) +} + +func (_CCIPSender *CCIPSenderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPSender.Contract.contract.Transfer(opts) +} + +func (_CCIPSender *CCIPSenderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CCIPSender.Contract.contract.Transact(opts, method, params...) +} + +func (_CCIPSender *CCIPSenderCaller) GetRouter(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CCIPSender.contract.Call(opts, &out, "getRouter") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_CCIPSender *CCIPSenderSession) GetRouter() (common.Address, error) { + return _CCIPSender.Contract.GetRouter(&_CCIPSender.CallOpts) +} + +func (_CCIPSender *CCIPSenderCallerSession) GetRouter() (common.Address, error) { + return _CCIPSender.Contract.GetRouter(&_CCIPSender.CallOpts) +} + +func (_CCIPSender *CCIPSenderCaller) IsApprovedSender(opts *bind.CallOpts, sourceChainSelector uint64, senderAddr []byte) (bool, error) { + var out []interface{} + err := _CCIPSender.contract.Call(opts, &out, "isApprovedSender", sourceChainSelector, senderAddr) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_CCIPSender *CCIPSenderSession) IsApprovedSender(sourceChainSelector uint64, senderAddr []byte) (bool, error) { + return _CCIPSender.Contract.IsApprovedSender(&_CCIPSender.CallOpts, sourceChainSelector, senderAddr) +} + +func (_CCIPSender *CCIPSenderCallerSession) IsApprovedSender(sourceChainSelector uint64, senderAddr []byte) (bool, error) { + return _CCIPSender.Contract.IsApprovedSender(&_CCIPSender.CallOpts, sourceChainSelector, senderAddr) +} + +func (_CCIPSender *CCIPSenderCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CCIPSender.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_CCIPSender *CCIPSenderSession) Owner() (common.Address, error) { + return _CCIPSender.Contract.Owner(&_CCIPSender.CallOpts) +} + +func (_CCIPSender *CCIPSenderCallerSession) Owner() (common.Address, error) { + return _CCIPSender.Contract.Owner(&_CCIPSender.CallOpts) +} + +func (_CCIPSender *CCIPSenderCaller) SChainConfigs(opts *bind.CallOpts, arg0 uint64) (SChainConfigs, + + error) { + var out []interface{} + err := _CCIPSender.contract.Call(opts, &out, "s_chainConfigs", arg0) + + outstruct := new(SChainConfigs) + if err != nil { + return *outstruct, err + } + + outstruct.Disabled = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.Recipient = *abi.ConvertType(out[1], new([]byte)).(*[]byte) + outstruct.ExtraArgsBytes = *abi.ConvertType(out[2], new([]byte)).(*[]byte) + + return *outstruct, err + +} + +func (_CCIPSender *CCIPSenderSession) SChainConfigs(arg0 uint64) (SChainConfigs, + + error) { + return _CCIPSender.Contract.SChainConfigs(&_CCIPSender.CallOpts, arg0) +} + +func (_CCIPSender *CCIPSenderCallerSession) SChainConfigs(arg0 uint64) (SChainConfigs, + + error) { + return _CCIPSender.Contract.SChainConfigs(&_CCIPSender.CallOpts, arg0) +} + +func (_CCIPSender *CCIPSenderCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _CCIPSender.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_CCIPSender *CCIPSenderSession) TypeAndVersion() (string, error) { + return _CCIPSender.Contract.TypeAndVersion(&_CCIPSender.CallOpts) +} + +func (_CCIPSender *CCIPSenderCallerSession) TypeAndVersion() (string, error) { + return _CCIPSender.Contract.TypeAndVersion(&_CCIPSender.CallOpts) +} + +func (_CCIPSender *CCIPSenderTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPSender.contract.Transact(opts, "acceptOwnership") +} + +func (_CCIPSender *CCIPSenderSession) AcceptOwnership() (*types.Transaction, error) { + return _CCIPSender.Contract.AcceptOwnership(&_CCIPSender.TransactOpts) +} + +func (_CCIPSender *CCIPSenderTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _CCIPSender.Contract.AcceptOwnership(&_CCIPSender.TransactOpts) +} + +func (_CCIPSender *CCIPSenderTransactor) CcipSend(opts *bind.TransactOpts, destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte, feeToken common.Address) (*types.Transaction, error) { + return _CCIPSender.contract.Transact(opts, "ccipSend", destChainSelector, tokenAmounts, data, feeToken) +} + +func (_CCIPSender *CCIPSenderSession) CcipSend(destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte, feeToken common.Address) (*types.Transaction, error) { + return _CCIPSender.Contract.CcipSend(&_CCIPSender.TransactOpts, destChainSelector, tokenAmounts, data, feeToken) +} + +func (_CCIPSender *CCIPSenderTransactorSession) CcipSend(destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte, feeToken common.Address) (*types.Transaction, error) { + return _CCIPSender.Contract.CcipSend(&_CCIPSender.TransactOpts, destChainSelector, tokenAmounts, data, feeToken) +} + +func (_CCIPSender *CCIPSenderTransactor) DisableChain(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) { + return _CCIPSender.contract.Transact(opts, "disableChain", chainSelector) +} + +func (_CCIPSender *CCIPSenderSession) DisableChain(chainSelector uint64) (*types.Transaction, error) { + return _CCIPSender.Contract.DisableChain(&_CCIPSender.TransactOpts, chainSelector) +} + +func (_CCIPSender *CCIPSenderTransactorSession) DisableChain(chainSelector uint64) (*types.Transaction, error) { + return _CCIPSender.Contract.DisableChain(&_CCIPSender.TransactOpts, chainSelector) +} + +func (_CCIPSender *CCIPSenderTransactor) EnableChain(opts *bind.TransactOpts, chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _CCIPSender.contract.Transact(opts, "enableChain", chainSelector, recipient, _extraArgsBytes) +} + +func (_CCIPSender *CCIPSenderSession) EnableChain(chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _CCIPSender.Contract.EnableChain(&_CCIPSender.TransactOpts, chainSelector, recipient, _extraArgsBytes) +} + +func (_CCIPSender *CCIPSenderTransactorSession) EnableChain(chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _CCIPSender.Contract.EnableChain(&_CCIPSender.TransactOpts, chainSelector, recipient, _extraArgsBytes) +} + +func (_CCIPSender *CCIPSenderTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _CCIPSender.contract.Transact(opts, "transferOwnership", to) +} + +func (_CCIPSender *CCIPSenderSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CCIPSender.Contract.TransferOwnership(&_CCIPSender.TransactOpts, to) +} + +func (_CCIPSender *CCIPSenderTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CCIPSender.Contract.TransferOwnership(&_CCIPSender.TransactOpts, to) +} + +func (_CCIPSender *CCIPSenderTransactor) UpdateApprovedSenders(opts *bind.TransactOpts, adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _CCIPSender.contract.Transact(opts, "updateApprovedSenders", adds, removes) +} + +func (_CCIPSender *CCIPSenderSession) UpdateApprovedSenders(adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _CCIPSender.Contract.UpdateApprovedSenders(&_CCIPSender.TransactOpts, adds, removes) +} + +func (_CCIPSender *CCIPSenderTransactorSession) UpdateApprovedSenders(adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _CCIPSender.Contract.UpdateApprovedSenders(&_CCIPSender.TransactOpts, adds, removes) +} + +func (_CCIPSender *CCIPSenderTransactor) WithdrawNativeToken(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPSender.contract.Transact(opts, "withdrawNativeToken", to, amount) +} + +func (_CCIPSender *CCIPSenderSession) WithdrawNativeToken(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPSender.Contract.WithdrawNativeToken(&_CCIPSender.TransactOpts, to, amount) +} + +func (_CCIPSender *CCIPSenderTransactorSession) WithdrawNativeToken(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPSender.Contract.WithdrawNativeToken(&_CCIPSender.TransactOpts, to, amount) +} + +func (_CCIPSender *CCIPSenderTransactor) WithdrawTokens(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPSender.contract.Transact(opts, "withdrawTokens", token, to, amount) +} + +func (_CCIPSender *CCIPSenderSession) WithdrawTokens(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPSender.Contract.WithdrawTokens(&_CCIPSender.TransactOpts, token, to, amount) +} + +func (_CCIPSender *CCIPSenderTransactorSession) WithdrawTokens(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _CCIPSender.Contract.WithdrawTokens(&_CCIPSender.TransactOpts, token, to, amount) +} + +func (_CCIPSender *CCIPSenderTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPSender.contract.RawTransact(opts, nil) +} + +func (_CCIPSender *CCIPSenderSession) Receive() (*types.Transaction, error) { + return _CCIPSender.Contract.Receive(&_CCIPSender.TransactOpts) +} + +func (_CCIPSender *CCIPSenderTransactorSession) Receive() (*types.Transaction, error) { + return _CCIPSender.Contract.Receive(&_CCIPSender.TransactOpts) +} + +type CCIPSenderMessageReceivedIterator struct { + Event *CCIPSenderMessageReceived + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPSenderMessageReceivedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPSenderMessageReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPSenderMessageReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPSenderMessageReceivedIterator) Error() error { + return it.fail +} + +func (it *CCIPSenderMessageReceivedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPSenderMessageReceived struct { + MessageId [32]byte + Raw types.Log +} + +func (_CCIPSender *CCIPSenderFilterer) FilterMessageReceived(opts *bind.FilterOpts) (*CCIPSenderMessageReceivedIterator, error) { + + logs, sub, err := _CCIPSender.contract.FilterLogs(opts, "MessageReceived") + if err != nil { + return nil, err + } + return &CCIPSenderMessageReceivedIterator{contract: _CCIPSender.contract, event: "MessageReceived", logs: logs, sub: sub}, nil +} + +func (_CCIPSender *CCIPSenderFilterer) WatchMessageReceived(opts *bind.WatchOpts, sink chan<- *CCIPSenderMessageReceived) (event.Subscription, error) { + + logs, sub, err := _CCIPSender.contract.WatchLogs(opts, "MessageReceived") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPSenderMessageReceived) + if err := _CCIPSender.contract.UnpackLog(event, "MessageReceived", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPSender *CCIPSenderFilterer) ParseMessageReceived(log types.Log) (*CCIPSenderMessageReceived, error) { + event := new(CCIPSenderMessageReceived) + if err := _CCIPSender.contract.UnpackLog(event, "MessageReceived", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPSenderMessageSentIterator struct { + Event *CCIPSenderMessageSent + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPSenderMessageSentIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPSenderMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPSenderMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPSenderMessageSentIterator) Error() error { + return it.fail +} + +func (it *CCIPSenderMessageSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPSenderMessageSent struct { + MessageId [32]byte + Raw types.Log +} + +func (_CCIPSender *CCIPSenderFilterer) FilterMessageSent(opts *bind.FilterOpts) (*CCIPSenderMessageSentIterator, error) { + + logs, sub, err := _CCIPSender.contract.FilterLogs(opts, "MessageSent") + if err != nil { + return nil, err + } + return &CCIPSenderMessageSentIterator{contract: _CCIPSender.contract, event: "MessageSent", logs: logs, sub: sub}, nil +} + +func (_CCIPSender *CCIPSenderFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *CCIPSenderMessageSent) (event.Subscription, error) { + + logs, sub, err := _CCIPSender.contract.WatchLogs(opts, "MessageSent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPSenderMessageSent) + if err := _CCIPSender.contract.UnpackLog(event, "MessageSent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPSender *CCIPSenderFilterer) ParseMessageSent(log types.Log) (*CCIPSenderMessageSent, error) { + event := new(CCIPSenderMessageSent) + if err := _CCIPSender.contract.UnpackLog(event, "MessageSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPSenderOwnershipTransferRequestedIterator struct { + Event *CCIPSenderOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPSenderOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPSenderOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPSenderOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPSenderOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *CCIPSenderOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPSenderOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_CCIPSender *CCIPSenderFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPSenderOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPSender.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &CCIPSenderOwnershipTransferRequestedIterator{contract: _CCIPSender.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_CCIPSender *CCIPSenderFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPSenderOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPSender.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPSenderOwnershipTransferRequested) + if err := _CCIPSender.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPSender *CCIPSenderFilterer) ParseOwnershipTransferRequested(log types.Log) (*CCIPSenderOwnershipTransferRequested, error) { + event := new(CCIPSenderOwnershipTransferRequested) + if err := _CCIPSender.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPSenderOwnershipTransferredIterator struct { + Event *CCIPSenderOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPSenderOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPSenderOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPSenderOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPSenderOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *CCIPSenderOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPSenderOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_CCIPSender *CCIPSenderFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPSenderOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPSender.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &CCIPSenderOwnershipTransferredIterator{contract: _CCIPSender.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_CCIPSender *CCIPSenderFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPSenderOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPSender.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPSenderOwnershipTransferred) + if err := _CCIPSender.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPSender *CCIPSenderFilterer) ParseOwnershipTransferred(log types.Log) (*CCIPSenderOwnershipTransferred, error) { + event := new(CCIPSenderOwnershipTransferred) + if err := _CCIPSender.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type SChainConfigs struct { + Disabled bool + Recipient []byte + ExtraArgsBytes []byte +} + +func (_CCIPSender *CCIPSender) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _CCIPSender.abi.Events["MessageReceived"].ID: + return _CCIPSender.ParseMessageReceived(log) + case _CCIPSender.abi.Events["MessageSent"].ID: + return _CCIPSender.ParseMessageSent(log) + case _CCIPSender.abi.Events["OwnershipTransferRequested"].ID: + return _CCIPSender.ParseOwnershipTransferRequested(log) + case _CCIPSender.abi.Events["OwnershipTransferred"].ID: + return _CCIPSender.ParseOwnershipTransferred(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (CCIPSenderMessageReceived) Topic() common.Hash { + return common.HexToHash("0xe29dc34207c78fc0f6048a32f159139c33339c6d6df8b07dcd33f6d699ff2327") +} + +func (CCIPSenderMessageSent) Topic() common.Hash { + return common.HexToHash("0x54791b38f3859327992a1ca0590ad3c0f08feba98d1a4f56ab0dca74d203392a") +} + +func (CCIPSenderOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (CCIPSenderOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (_CCIPSender *CCIPSender) Address() common.Address { + return _CCIPSender.address +} + +type CCIPSenderInterface interface { + GetRouter(opts *bind.CallOpts) (common.Address, error) + + IsApprovedSender(opts *bind.CallOpts, sourceChainSelector uint64, senderAddr []byte) (bool, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + SChainConfigs(opts *bind.CallOpts, arg0 uint64) (SChainConfigs, + + error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + CcipSend(opts *bind.TransactOpts, destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte, feeToken common.Address) (*types.Transaction, error) + + DisableChain(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) + + EnableChain(opts *bind.TransactOpts, chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + UpdateApprovedSenders(opts *bind.TransactOpts, adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) + + WithdrawNativeToken(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) + + WithdrawTokens(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) + + Receive(opts *bind.TransactOpts) (*types.Transaction, error) + + FilterMessageReceived(opts *bind.FilterOpts) (*CCIPSenderMessageReceivedIterator, error) + + WatchMessageReceived(opts *bind.WatchOpts, sink chan<- *CCIPSenderMessageReceived) (event.Subscription, error) + + ParseMessageReceived(log types.Log) (*CCIPSenderMessageReceived, error) + + FilterMessageSent(opts *bind.FilterOpts) (*CCIPSenderMessageSentIterator, error) + + WatchMessageSent(opts *bind.WatchOpts, sink chan<- *CCIPSenderMessageSent) (event.Subscription, error) + + ParseMessageSent(log types.Log) (*CCIPSenderMessageSent, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPSenderOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPSenderOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*CCIPSenderOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPSenderOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPSenderOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*CCIPSenderOwnershipTransferred, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/ccip/generated/ping_pong_demo/ping_pong_demo.go b/core/gethwrappers/ccip/generated/ping_pong_demo/ping_pong_demo.go index 4387dd3080..cba0ab7ac8 100644 --- a/core/gethwrappers/ccip/generated/ping_pong_demo/ping_pong_demo.go +++ b/core/gethwrappers/ccip/generated/ping_pong_demo/ping_pong_demo.go @@ -30,6 +30,11 @@ var ( _ = abi.ConvertType ) +type CCIPClientBaseApprovedSenderUpdate struct { + DestChainSelector uint64 + Sender []byte +} + type ClientAny2EVMMessage struct { MessageId [32]byte SourceChainSelector uint64 @@ -44,8 +49,8 @@ type ClientEVMTokenAmount struct { } var PingPongDemoMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"feeToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"InvalidRouter\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pingPongCount\",\"type\":\"uint256\"}],\"name\":\"Ping\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pingPongCount\",\"type\":\"uint256\"}],\"name\":\"Pong\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"ccipReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCounterpartAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCounterpartChainSelector\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"counterpartChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"counterpartAddress\",\"type\":\"address\"}],\"name\":\"setCounterpart\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setCounterpartAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"setCounterpartChainSelector\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pause\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startPingPong\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b50604051620013d8380380620013d8833981016040819052620000349162000263565b33806000846001600160a01b03811662000069576040516335fdcccd60e21b8152600060048201526024015b60405180910390fd5b6001600160a01b039081166080528216620000c75760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f0000000000000000604482015260640162000060565b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000fa57620000fa816200019f565b50506002805460ff60a01b1916905550600380546001600160a01b0319166001600160a01b0383811691821790925560405163095ea7b360e01b8152918416600483015260001960248301529063095ea7b3906044016020604051808303816000875af115801562000170573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001969190620002a2565b505050620002cd565b336001600160a01b03821603620001f95760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000060565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6001600160a01b03811681146200026057600080fd5b50565b600080604083850312156200027757600080fd5b825162000284816200024a565b602084015190925062000297816200024a565b809150509250929050565b600060208284031215620002b557600080fd5b81518015158114620002c657600080fd5b9392505050565b6080516110e1620002f7600039600081816102290152818161058e01526108f201526110e16000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063b5a1101111610066578063b5a1101114610270578063bee518a414610283578063ca709a25146102c1578063f2fde38b146102df57600080fd5b80638da5cb5b146101f65780639d2aede514610214578063b0f479a114610227578063b187bd261461024d57600080fd5b80632874d8bf116100d35780632874d8bf146101945780632b6e5d631461019c57806379ba5097146101db57806385572ffb146101e357600080fd5b806301ffc9a71461010557806316c38b3c1461012d578063181f5a77146101425780631892b90614610181575b600080fd5b610118610113366004610af5565b6102f2565b60405190151581526020015b60405180910390f35b61014061013b366004610b3e565b61038b565b005b604080518082018252601281527f50696e67506f6e6744656d6f20312e322e300000000000000000000000000000602082015290516101249190610bc4565b61014061018f366004610bf4565b6103dd565b610140610438565b60025473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610124565b610140610474565b6101406101f1366004610c0f565b610576565b60005473ffffffffffffffffffffffffffffffffffffffff166101b6565b610140610222366004610c6e565b6105fb565b7f00000000000000000000000000000000000000000000000000000000000000006101b6565b60025474010000000000000000000000000000000000000000900460ff16610118565b61014061027e366004610c89565b61064a565b60015474010000000000000000000000000000000000000000900467ffffffffffffffff1660405167ffffffffffffffff9091168152602001610124565b60035473ffffffffffffffffffffffffffffffffffffffff166101b6565b6101406102ed366004610c6e565b6106ec565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f85572ffb00000000000000000000000000000000000000000000000000000000148061038557507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b6103936106fd565b6002805491151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6103e56106fd565b6001805467ffffffffffffffff90921674010000000000000000000000000000000000000000027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6104406106fd565b600280547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055610472600161077e565b565b60015473ffffffffffffffffffffffffffffffffffffffff1633146104fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146105e7576040517fd7f733340000000000000000000000000000000000000000000000000000000081523360048201526024016104f1565b6105f86105f382610ebf565b6109aa565b50565b6106036106fd565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6106526106fd565b6001805467ffffffffffffffff90931674010000000000000000000000000000000000000000027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909316929092179091556002805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffffff0000000000000000000000000000000000000000909216919091179055565b6106f46106fd565b6105f881610a00565b60005473ffffffffffffffffffffffffffffffffffffffff163314610472576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016104f1565b806001166001036107c1576040518181527f48257dc961b6f792c2b78a080dacfed693b660960a702de21cee364e20270e2f9060200160405180910390a16107f5565b6040518181527f58b69f57828e6962d216502094c54f6562f3bf082ba758966c3454f9e37b15259060200160405180910390a15b60008160405160200161080a91815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815260a08301825260025473ffffffffffffffffffffffffffffffffffffffff1660c0808501919091528251808503909101815260e084018352835260208084018290528251600080825291810184529194509291820190836108b8565b60408051808201909152600080825260208201528152602001906001900390816108915790505b50815260035473ffffffffffffffffffffffffffffffffffffffff16602080830191909152604080519182018152600082529091015290507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166396f4e9f9600160149054906101000a900467ffffffffffffffff16836040518363ffffffff1660e01b8152600401610961929190610f6c565b6020604051808303816000875af1158015610980573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a49190611081565b50505050565b600081606001518060200190518101906109c49190611081565b60025490915074010000000000000000000000000000000000000000900460ff166109fc576109fc6109f782600161109a565b61077e565b5050565b3373ffffffffffffffffffffffffffffffffffffffff821603610a7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016104f1565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215610b0757600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610b3757600080fd5b9392505050565b600060208284031215610b5057600080fd5b81358015158114610b3757600080fd5b6000815180845260005b81811015610b8657602081850181015186830182015201610b6a565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610b376020830184610b60565b803567ffffffffffffffff81168114610bef57600080fd5b919050565b600060208284031215610c0657600080fd5b610b3782610bd7565b600060208284031215610c2157600080fd5b813567ffffffffffffffff811115610c3857600080fd5b820160a08185031215610b3757600080fd5b803573ffffffffffffffffffffffffffffffffffffffff81168114610bef57600080fd5b600060208284031215610c8057600080fd5b610b3782610c4a565b60008060408385031215610c9c57600080fd5b610ca583610bd7565b9150610cb360208401610c4a565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715610d0e57610d0e610cbc565b60405290565b60405160a0810167ffffffffffffffff81118282101715610d0e57610d0e610cbc565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610d7e57610d7e610cbc565b604052919050565b600082601f830112610d9757600080fd5b813567ffffffffffffffff811115610db157610db1610cbc565b610de260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601610d37565b818152846020838601011115610df757600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f830112610e2557600080fd5b8135602067ffffffffffffffff821115610e4157610e41610cbc565b610e4f818360051b01610d37565b82815260069290921b84018101918181019086841115610e6e57600080fd5b8286015b84811015610eb45760408189031215610e8b5760008081fd5b610e93610ceb565b610e9c82610c4a565b81528185013585820152835291830191604001610e72565b509695505050505050565b600060a08236031215610ed157600080fd5b610ed9610d14565b82358152610ee960208401610bd7565b6020820152604083013567ffffffffffffffff80821115610f0957600080fd5b610f1536838701610d86565b60408401526060850135915080821115610f2e57600080fd5b610f3a36838701610d86565b60608401526080850135915080821115610f5357600080fd5b50610f6036828601610e14565b60808301525092915050565b6000604067ffffffffffffffff851683526020604081850152845160a06040860152610f9b60e0860182610b60565b9050818601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc080878403016060880152610fd68383610b60565b6040890151888203830160808a01528051808352908601945060009350908501905b80841015611037578451805173ffffffffffffffffffffffffffffffffffffffff16835286015186830152938501936001939093019290860190610ff8565b50606089015173ffffffffffffffffffffffffffffffffffffffff1660a08901526080890151888203830160c08a015295506110738187610b60565b9a9950505050505050505050565b60006020828403121561109357600080fd5b5051919050565b80820180821115610385577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"feeToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"CannotAcknowledgeUnsentMessage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAckMessageHeader\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"}],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"InvalidRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"name\":\"InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageAlreadyAcknowledged\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageNotFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySelf\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newToken\",\"type\":\"address\"}],\"name\":\"FeeTokenModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenReceiver\",\"type\":\"address\"}],\"name\":\"MessageAbandoned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"MessageAckReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"incomingMessageId\",\"type\":\"bytes32\"}],\"name\":\"MessageAckSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageRecovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"incomingMessageId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ACKMessageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pingPongCount\",\"type\":\"uint256\"}],\"name\":\"Ping\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pingPongCount\",\"type\":\"uint256\"}],\"name\":\"Pong\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ACK_MESSAGE_HEADER\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"abandonFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"ccipReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ccipSend\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"disableChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_extraArgsBytes\",\"type\":\"bytes\"}],\"name\":\"enableChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCounterpartAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCounterpartChainSelector\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"getMessageContents\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"getMessageStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"senderAddr\",\"type\":\"bytes\"}],\"name\":\"isApprovedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"modifyFeeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"processMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"retryFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"s_chainConfigs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraArgsBytes\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_feeToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"s_messageStatus\",\"outputs\":[{\"internalType\":\"enumCCIPReceiverWithACK.MessageStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"counterpartChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"counterpartAddress\",\"type\":\"address\"}],\"name\":\"setCounterpart\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"counterpartAddress\",\"type\":\"address\"}],\"name\":\"setCounterpartAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"counterpartChainSelector\",\"type\":\"uint64\"}],\"name\":\"setCounterpartChainSelector\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pause\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startPingPong\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPClientBase.ApprovedSenderUpdate[]\",\"name\":\"adds\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPClientBase.ApprovedSenderUpdate[]\",\"name\":\"removes\",\"type\":\"tuple[]\"}],\"name\":\"updateApprovedSenders\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawNativeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60a06040523480156200001157600080fd5b50604051620046bf380380620046bf833981016040819052620000349162000563565b8181818181803380600081620000915760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c457620000c4816200013f565b5050506001600160a01b038116620000ef576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b03908116608052600780546001600160a01b03191691841691821790551590506200013357620001336001600160a01b03821683600019620001ea565b50505050505062000688565b336001600160a01b03821603620001995760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000088565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156200023c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002629190620005a2565b6200026e9190620005bc565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152919250620002ca91869190620002d016565b50505050565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908201526000906200031f906001600160a01b038516908490620003a6565b805190915015620003a15780806020019051810190620003409190620005e4565b620003a15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000088565b505050565b6060620003b78484600085620003bf565b949350505050565b606082471015620004225760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000088565b600080866001600160a01b0316858760405162000440919062000635565b60006040518083038185875af1925050503d80600081146200047f576040519150601f19603f3d011682016040523d82523d6000602084013e62000484565b606091505b5090925090506200049887838387620004a3565b979650505050505050565b60608315620005175782516000036200050f576001600160a01b0385163b6200050f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000088565b5081620003b7565b620003b783838151156200052e5781518083602001fd5b8060405162461bcd60e51b815260040162000088919062000653565b6001600160a01b03811681146200056057600080fd5b50565b600080604083850312156200057757600080fd5b825162000584816200054a565b602084015190925062000597816200054a565b809150509250929050565b600060208284031215620005b557600080fd5b5051919050565b80820180821115620005de57634e487b7160e01b600052601160045260246000fd5b92915050565b600060208284031215620005f757600080fd5b815180151581146200060857600080fd5b9392505050565b60005b838110156200062c57818101518382015260200162000612565b50506000910152565b60008251620006498184602087016200060f565b9190910192915050565b6020815260008251806020840152620006748160408501602087016200060f565b601f01601f19169190910160400192915050565b608051613ff1620006ce6000396000818161057e01528181610759015281816107e90152818161137301528181612033015281816120fc01526121d40152613ff16000f3fe6080604052600436106101dc5760003560e01c80636fef519e11610102578063b5a1101111610095578063e4ca875411610064578063e4ca875414610663578063e89b448514610683578063f2fde38b14610696578063ff2deec3146106b657600080fd5b8063b5a11011146105da578063bee518a4146105fa578063cf6730f814610623578063d8469e401461064357600080fd5b80638da5cb5b116100d15780638da5cb5b146105245780639d2aede51461054f578063b0f479a11461056f578063b187bd26146105a257600080fd5b80636fef519e1461048657806379ba5097146104cf5780638462a2b9146104e457806385572ffb1461050457600080fd5b80632b6e5d631161017a578063536c6bfa11610149578063536c6bfa146103f95780635e35359e146104195780636939cd97146104395780636d62d6331461046657600080fd5b80632b6e5d631461032457806335f170ef1461037c57806341eade46146103ab5780635075a9d4146103cb57600080fd5b806316c38b3c116101b657806316c38b3c14610280578063181f5a77146102a05780631892b906146102ef5780632874d8bf1461030f57600080fd5b806305bfe982146101e85780630e958d6b1461022e57806311e85dff1461025e57600080fd5b366101e357005b600080fd5b3480156101f457600080fd5b50610218610203366004612ee6565b60086020526000908152604090205460ff1681565b6040516102259190612eff565b60405180910390f35b34801561023a57600080fd5b5061024e610249366004612f9f565b6106e3565b6040519015158152602001610225565b34801561026a57600080fd5b5061027e610279366004613016565b61072e565b005b34801561028c57600080fd5b5061027e61029b366004613041565b6108a6565b3480156102ac57600080fd5b5060408051808201909152601281527f50696e67506f6e6744656d6f20312e332e30000000000000000000000000000060208201525b60405161022591906130cc565b3480156102fb57600080fd5b5061027e61030a3660046130df565b610900565b34801561031b57600080fd5b5061027e610943565b34801561033057600080fd5b5060095468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610225565b34801561038857600080fd5b5061039c6103973660046130df565b61097f565b604051610225939291906130fc565b3480156103b757600080fd5b5061027e6103c63660046130df565b610ab6565b3480156103d757600080fd5b506103eb6103e6366004612ee6565b610b01565b604051908152602001610225565b34801561040557600080fd5b5061027e610414366004613133565b610b14565b34801561042557600080fd5b5061027e61043436600461315f565b610b2a565b34801561044557600080fd5b50610459610454366004612ee6565b610b58565b60405161022591906131fd565b34801561047257600080fd5b5061027e61048136600461329a565b610d63565b34801561049257600080fd5b506102e26040518060400160405280601581526020017f4d4553534147455f41434b4e4f574c45444745445f000000000000000000000081525081565b3480156104db57600080fd5b5061027e61107d565b3480156104f057600080fd5b5061027e6104ff36600461330f565b61117a565b34801561051057600080fd5b5061027e61051f36600461337b565b61135b565b34801561053057600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610357565b34801561055b57600080fd5b5061027e61056a366004613016565b611656565b34801561057b57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610357565b3480156105ae57600080fd5b506009547c0100000000000000000000000000000000000000000000000000000000900460ff1661024e565b3480156105e657600080fd5b5061027e6105f53660046133b6565b611710565b34801561060657600080fd5b5060095460405167ffffffffffffffff9091168152602001610225565b34801561062f57600080fd5b5061027e61063e36600461337b565b611883565b34801561064f57600080fd5b5061027e61065e3660046133e4565b611a70565b34801561066f57600080fd5b5061027e61067e366004612ee6565b611aef565b6103eb61069136600461359c565b611d58565b3480156106a257600080fd5b5061027e6106b1366004613016565b6122dc565b3480156106c257600080fd5b506007546103579073ffffffffffffffffffffffffffffffffffffffff1681565b67ffffffffffffffff8316600090815260026020526040808220905160039091019061071290859085906136a9565b9081526040519081900360200190205460ff1690509392505050565b6107366122f0565b60075473ffffffffffffffffffffffffffffffffffffffff1615610799576107997f000000000000000000000000000000000000000000000000000000000000000060075473ffffffffffffffffffffffffffffffffffffffff16906000612371565b6007805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355169015610848576108487f000000000000000000000000000000000000000000000000000000000000000060075473ffffffffffffffffffffffffffffffffffffffff16907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612571565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f4a1cb6b940121ea2ba30fb9b494035cbfe2d4b6b080db8b502150410bef7eb4e60405160405180910390a35050565b6108ae6122f0565b600980549115157c0100000000000000000000000000000000000000000000000000000000027fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6109086122f0565b600980547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff92909216919091179055565b61094b6122f0565b600980547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff16905561097d6001612675565b565b6002602052600090815260409020805460018201805460ff90921692916109a5906136b9565b80601f01602080910402602001604051908101604052809291908181526020018280546109d1906136b9565b8015610a1e5780601f106109f357610100808354040283529160200191610a1e565b820191906000526020600020905b815481529060010190602001808311610a0157829003601f168201915b505050505090806002018054610a33906136b9565b80601f0160208091040260200160405190810160405280929190818152602001828054610a5f906136b9565b8015610aac5780601f10610a8157610100808354040283529160200191610aac565b820191906000526020600020905b815481529060010190602001808311610a8f57829003601f168201915b5050505050905083565b610abe6122f0565b67ffffffffffffffff16600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6000610b0e600483612782565b92915050565b610b1c6122f0565b610b268282612795565b5050565b610b326122f0565b610b5373ffffffffffffffffffffffffffffffffffffffff841683836128ef565b505050565b6040805160a08082018352600080835260208084018290526060848601819052808501819052608085015285825260038152908490208451928301855280548352600181015467ffffffffffffffff1691830191909152600281018054939492939192840191610bc7906136b9565b80601f0160208091040260200160405190810160405280929190818152602001828054610bf3906136b9565b8015610c405780601f10610c1557610100808354040283529160200191610c40565b820191906000526020600020905b815481529060010190602001808311610c2357829003601f168201915b50505050508152602001600382018054610c59906136b9565b80601f0160208091040260200160405190810160405280929190818152602001828054610c85906136b9565b8015610cd25780601f10610ca757610100808354040283529160200191610cd2565b820191906000526020600020905b815481529060010190602001808311610cb557829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015610d555760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101610d00565b505050915250909392505050565b610d6b6122f0565b6001610d78600484612782565b14610db7576040517fb6e78260000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b610dc78260025b60049190612945565b506000828152600360209081526040808320815160a08101835281548152600182015467ffffffffffffffff16938101939093526002810180549192840191610e0f906136b9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e3b906136b9565b8015610e885780601f10610e5d57610100808354040283529160200191610e88565b820191906000526020600020905b815481529060010190602001808311610e6b57829003601f168201915b50505050508152602001600382018054610ea1906136b9565b80601f0160208091040260200160405190810160405280929190818152602001828054610ecd906136b9565b8015610f1a5780601f10610eef57610100808354040283529160200191610f1a565b820191906000526020600020905b815481529060010190602001808311610efd57829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015610f9d5760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101610f48565b5050505081525050905060005b81608001515181101561102c576110248383608001518381518110610fd157610fd161370c565b60200260200101516020015184608001518481518110610ff357610ff361370c565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff166128ef9092919063ffffffff16565b600101610faa565b5060405173ffffffffffffffffffffffffffffffffffffffff8316815283907fd5038100bd3dc9631d3c3f4f61a3e53e9d466f40c47af9897292c7b35e32a9579060200160405180910390a2505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146110fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610dae565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6111826122f0565b60005b8181101561126557600260008484848181106111a3576111a361370c565b90506020028101906111b5919061373b565b6111c39060208101906130df565b67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206003018383838181106111fa576111fa61370c565b905060200281019061120c919061373b565b61121a906020810190613779565b6040516112289291906136a9565b90815260405190819003602001902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600101611185565b5060005b83811015611354576001600260008787858181106112895761128961370c565b905060200281019061129b919061373b565b6112a99060208101906130df565b67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206003018686848181106112e0576112e061370c565b90506020028101906112f2919061373b565b611300906020810190613779565b60405161130e9291906136a9565b90815260405190819003602001902080549115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909216919091179055600101611269565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146113cc576040517fd7f73334000000000000000000000000000000000000000000000000000000008152336004820152602401610dae565b6113dc60408201602083016130df565b6113e96040830183613779565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525067ffffffffffffffff86168152600260205260409081902090516003909101935061144792508491506137de565b9081526040519081900360200190205460ff1661149257806040517f5075bb38000000000000000000000000000000000000000000000000000000008152600401610dae91906130cc565b6114a260408401602085016130df565b67ffffffffffffffff811660009081526002602052604090206001810180546114ca906136b9565b159050806114d95750805460ff165b1561151c576040517fd79f2ea400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff83166004820152602401610dae565b6040517fcf6730f8000000000000000000000000000000000000000000000000000000008152309063cf6730f8906115589088906004016138f2565b600060405180830381600087803b15801561157257600080fd5b505af1925050508015611583575060015b611623573d8080156115b1576040519150601f19603f3d011682016040523d82523d6000602084013e6115b6565b606091505b506115c386356001610dbe565b508535600090815260036020526040902086906115e08282613cc4565b50506040518635907f55bc02a9ef6f146737edeeb425738006f67f077e7138de3bf84a15bde1a5b56f906116159084906130cc565b60405180910390a250611354565b6040518535907fdf6958669026659bac75ba986685e11a7d271284989f565f2802522663e9a70f90600090a25050505050565b61165e6122f0565b600980547fffffffff0000000000000000000000000000000000000000ffffffffffffffff166801000000000000000073ffffffffffffffffffffffffffffffffffffffff84169081029190911790915560408051602081019290925201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815260095467ffffffffffffffff16600090815260026020522060010190610b269082613dbe565b6117186122f0565b6009805467ffffffffffffffff84167fffffffff0000000000000000000000000000000000000000000000000000000090911681176801000000000000000073ffffffffffffffffffffffffffffffffffffffff8516908102919091179092556000908152600260209081526040918290208251918201939093526001926003019101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526117d3916137de565b908152604080516020928190038301812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169415159490941790935573ffffffffffffffffffffffffffffffffffffffff84169183019190915201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815267ffffffffffffffff8416600090815260026020522060010190610b539082613dbe565b3330146118bc576040517f14d4a4e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118cc60408201602083016130df565b6118d96040830183613779565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525067ffffffffffffffff86168152600260205260409081902090516003909101935061193792508491506137de565b9081526040519081900360200190205460ff1661198257806040517f5075bb38000000000000000000000000000000000000000000000000000000008152600401610dae91906130cc565b61199260408401602085016130df565b67ffffffffffffffff811660009081526002602052604090206001810180546119ba906136b9565b159050806119c95750805460ff165b15611a0c576040517fd79f2ea400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff83166004820152602401610dae565b6000611a1b6060870187613779565b810190611a289190612ee6565b6009549091507c0100000000000000000000000000000000000000000000000000000000900460ff16611a6857611a68611a63826001613ed8565b612675565b505050505050565b611a786122f0565b67ffffffffffffffff8516600090815260026020526040902060018101611aa0858783613a48565b508115611ab85760028101611ab6838583613a48565b505b805460ff1615611a685780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555050505050565b611af76122f0565b6001611b04600483612782565b14611b3e576040517fb6e7826000000000000000000000000000000000000000000000000000000000815260048101829052602401610dae565b611b49816000610dbe565b506000818152600360209081526040808320815160a08101835281548152600182015467ffffffffffffffff16938101939093526002810180549192840191611b91906136b9565b80601f0160208091040260200160405190810160405280929190818152602001828054611bbd906136b9565b8015611c0a5780601f10611bdf57610100808354040283529160200191611c0a565b820191906000526020600020905b815481529060010190602001808311611bed57829003601f168201915b50505050508152602001600382018054611c23906136b9565b80601f0160208091040260200160405190810160405280929190818152602001828054611c4f906136b9565b8015611c9c5780601f10611c7157610100808354040283529160200191611c9c565b820191906000526020600020905b815481529060010190602001808311611c7f57829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015611d1f5760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101611cca565b5050505081525050905060405182907fef3bf8c64bc480286c4f3503b870ceb23e648d2d902e31fb7bb46680da6de8ad90600090a25050565b67ffffffffffffffff8316600090815260026020526040812060018101805486929190611d84906136b9565b15905080611d935750805460ff165b15611dd6576040517fd79f2ea400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff83166004820152602401610dae565b6040805160a08101825267ffffffffffffffff8816600090815260026020529182206001018054829190611e09906136b9565b80601f0160208091040260200160405190810160405280929190818152602001828054611e35906136b9565b8015611e825780601f10611e5757610100808354040283529160200191611e82565b820191906000526020600020905b815481529060010190602001808311611e6557829003601f168201915b5050509183525050602080820188905260408083018a905260075473ffffffffffffffffffffffffffffffffffffffff16606084015267ffffffffffffffff8b16600090815260029283905220018054608090920191611ee1906136b9565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0d906136b9565b8015611f5a5780601f10611f2f57610100808354040283529160200191611f5a565b820191906000526020600020905b815481529060010190602001808311611f3d57829003601f168201915b5050505050815250905060005b86518110156120bb57611fd73330898481518110611f8757611f8761370c565b6020026020010151602001518a8581518110611fa557611fa561370c565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1661295a909392919063ffffffff16565b600754875173ffffffffffffffffffffffffffffffffffffffff909116908890839081106120075761200761370c565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16146120b3576120b37f00000000000000000000000000000000000000000000000000000000000000008883815181106120645761206461370c565b6020026020010151602001518984815181106120825761208261370c565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff166125719092919063ffffffff16565b600101611f67565b506040517f20487ded00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906320487ded90612133908b908690600401613eeb565b602060405180830381865afa158015612150573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121749190613fae565b60075490915073ffffffffffffffffffffffffffffffffffffffff16156121ba576007546121ba9073ffffffffffffffffffffffffffffffffffffffff1633308461295a565b60075473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116916396f4e9f991161561220957600061220b565b825b8a856040518463ffffffff1660e01b815260040161222a929190613eeb565b60206040518083038185885af1158015612248573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061226d9190613fae565b60008181526008602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055519196509086907f9102b9031c3c59d8320bf14d84d7d7a3434366b91032fad1c87579cfc62b2372908390a3505050509392505050565b6122e46122f0565b6122ed816129b8565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461097d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610dae565b80158061241157506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156123eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240f9190613fae565b155b61249d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610dae565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610b539084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612aad565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156125e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061260c9190613fae565b6126169190613ed8565b60405173ffffffffffffffffffffffffffffffffffffffff851660248201526044810182905290915061266f9085907f095ea7b300000000000000000000000000000000000000000000000000000000906064016124ef565b50505050565b806001166001036126b8576040518181527f48257dc961b6f792c2b78a080dacfed693b660960a702de21cee364e20270e2f9060200160405180910390a16126ec565b6040518181527f58b69f57828e6962d216502094c54f6562f3bf082ba758966c3454f9e37b15259060200160405180910390a15b60008160405160200161270191815260200190565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152600954600080855260208501909352909350610b539267ffffffffffffffff9091169161277b565b60408051808201909152600080825260208201528152602001906001900390816127545790505b5083611d58565b600061278e8383612bb9565b9392505050565b804710156127ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610dae565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612859576040519150601f19603f3d011682016040523d82523d6000602084013e61285e565b606091505b5050905080610b53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610dae565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610b539084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016124ef565b6000612952848484612c43565b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261266f9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016124ef565b3373ffffffffffffffffffffffffffffffffffffffff821603612a37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610dae565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000612b0f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612c609092919063ffffffff16565b805190915015610b535780806020019051810190612b2d9190613fc7565b610b53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610dae565b600081815260028301602052604081205480151580612bdd5750612bdd8484612c6f565b61278e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f456e756d657261626c654d61703a206e6f6e6578697374656e74206b657900006044820152606401610dae565b600082815260028401602052604081208290556129528484612c7b565b60606129528484600085612c87565b600061278e8383612da0565b600061278e8383612db8565b606082471015612d19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610dae565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612d4291906137de565b60006040518083038185875af1925050503d8060008114612d7f576040519150601f19603f3d011682016040523d82523d6000602084013e612d84565b606091505b5091509150612d9587838387612e07565b979650505050505050565b6000818152600183016020526040812054151561278e565b6000818152600183016020526040812054612dff57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610b0e565b506000610b0e565b60608315612e9d578251600003612e965773ffffffffffffffffffffffffffffffffffffffff85163b612e96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610dae565b5081612952565b6129528383815115612eb25781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dae91906130cc565b600060208284031215612ef857600080fd5b5035919050565b6020810160038310612f3a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b67ffffffffffffffff811681146122ed57600080fd5b60008083601f840112612f6857600080fd5b50813567ffffffffffffffff811115612f8057600080fd5b602083019150836020828501011115612f9857600080fd5b9250929050565b600080600060408486031215612fb457600080fd5b8335612fbf81612f40565b9250602084013567ffffffffffffffff811115612fdb57600080fd5b612fe786828701612f56565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146122ed57600080fd5b60006020828403121561302857600080fd5b813561278e81612ff4565b80151581146122ed57600080fd5b60006020828403121561305357600080fd5b813561278e81613033565b60005b83811015613079578181015183820152602001613061565b50506000910152565b6000815180845261309a81602086016020860161305e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061278e6020830184613082565b6000602082840312156130f157600080fd5b813561278e81612f40565b83151581526060602082015260006131176060830185613082565b82810360408401526131298185613082565b9695505050505050565b6000806040838503121561314657600080fd5b823561315181612ff4565b946020939093013593505050565b60008060006060848603121561317457600080fd5b833561317f81612ff4565b9250602084013561318f81612ff4565b929592945050506040919091013590565b60008151808452602080850194506020840160005b838110156131f2578151805173ffffffffffffffffffffffffffffffffffffffff16885283015183880152604090960195908201906001016131b5565b509495945050505050565b602081528151602082015267ffffffffffffffff60208301511660408201526000604083015160a0606084015261323760c0840182613082565b905060608401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160808601526132738383613082565b925060808601519150808584030160a08601525061329182826131a0565b95945050505050565b600080604083850312156132ad57600080fd5b8235915060208301356132bf81612ff4565b809150509250929050565b60008083601f8401126132dc57600080fd5b50813567ffffffffffffffff8111156132f457600080fd5b6020830191508360208260051b8501011115612f9857600080fd5b6000806000806040858703121561332557600080fd5b843567ffffffffffffffff8082111561333d57600080fd5b613349888389016132ca565b9096509450602087013591508082111561336257600080fd5b5061336f878288016132ca565b95989497509550505050565b60006020828403121561338d57600080fd5b813567ffffffffffffffff8111156133a457600080fd5b820160a0818503121561278e57600080fd5b600080604083850312156133c957600080fd5b82356133d481612f40565b915060208301356132bf81612ff4565b6000806000806000606086880312156133fc57600080fd5b853561340781612f40565b9450602086013567ffffffffffffffff8082111561342457600080fd5b61343089838a01612f56565b9096509450604088013591508082111561344957600080fd5b5061345688828901612f56565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156134b9576134b9613467565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561350657613506613467565b604052919050565b600082601f83011261351f57600080fd5b813567ffffffffffffffff81111561353957613539613467565b61356a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016134bf565b81815284602083860101111561357f57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000606084860312156135b157600080fd5b83356135bc81612f40565b925060208481013567ffffffffffffffff808211156135da57600080fd5b818701915087601f8301126135ee57600080fd5b81358181111561360057613600613467565b61360e848260051b016134bf565b81815260069190911b8301840190848101908a83111561362d57600080fd5b938501935b82851015613679576040858c03121561364b5760008081fd5b613653613496565b853561365e81612ff4565b81528587013587820152825260409094019390850190613632565b96505050604087013592508083111561369157600080fd5b505061369f8682870161350e565b9150509250925092565b8183823760009101908152919050565b600181811c908216806136cd57607f821691505b602082108103613706577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261376f57600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126137ae57600080fd5b83018035915067ffffffffffffffff8211156137c957600080fd5b602001915036819003821315612f9857600080fd5b6000825161376f81846020870161305e565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261382557600080fd5b830160208101925035905067ffffffffffffffff81111561384557600080fd5b803603821315612f9857600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8183526000602080850194508260005b858110156131f25781356138c081612ff4565b73ffffffffffffffffffffffffffffffffffffffff1687528183013583880152604096870196909101906001016138ad565b60208152813560208201526000602083013561390d81612f40565b67ffffffffffffffff808216604085015261392b60408601866137f0565b925060a0606086015261394260c086018483613854565b92505061395260608601866137f0565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080878603016080880152613988858385613854565b9450608088013592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18836030183126139c157600080fd5b602092880192830192359150838211156139da57600080fd5b8160061b36038313156139ec57600080fd5b8685030160a0870152612d9584828461389d565b601f821115610b53576000816000526020600020601f850160051c81016020861015613a295750805b601f850160051c820191505b81811015611a6857828155600101613a35565b67ffffffffffffffff831115613a6057613a60613467565b613a7483613a6e83546136b9565b83613a00565b6000601f841160018114613ac65760008515613a905750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611354565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015613b155786850135825560209485019460019092019101613af5565b5086821015613b50577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8135613b9c81612ff4565b73ffffffffffffffffffffffffffffffffffffffff81167fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825550602082013560018201555050565b68010000000000000000831115613c0257613c02613467565b805483825580841015613c8f5760017f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8083168314613c4357613c43613b62565b8086168614613c5457613c54613b62565b5060008360005260206000208360011b81018760011b820191505b80821015613c8a578282558284830155600282019150613c6f565b505050505b5060008181526020812083915b85811015611a6857613cae8383613b91565b6040929092019160029190910190600101613c9c565b81358155600181016020830135613cda81612f40565b67ffffffffffffffff8082167fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000845416178355613d1a6040860186613779565b93509150613d2c838360028701613a48565b613d396060860186613779565b93509150613d4b838360038701613a48565b608085013592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1853603018312613d8257600080fd5b918401918235915080821115613d9757600080fd5b506020820191508060061b3603821315613db057600080fd5b61266f818360048601613be9565b815167ffffffffffffffff811115613dd857613dd8613467565b613dec81613de684546136b9565b84613a00565b602080601f831160018114613e3f5760008415613e095750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611a68565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613e8c57888601518255948401946001909101908401613e6d565b5085821015613ec857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115610b0e57610b0e613b62565b67ffffffffffffffff83168152604060208201526000825160a06040840152613f1760e0840182613082565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc080858403016060860152613f538383613082565b92506040860151915080858403016080860152613f7083836131a0565b925073ffffffffffffffffffffffffffffffffffffffff60608701511660a086015260808601519150808584030160c0860152506131298282613082565b600060208284031215613fc057600080fd5b5051919050565b600060208284031215613fd957600080fd5b815161278e8161303356fea164736f6c6343000818000a", } var PingPongDemoABI = PingPongDemoMetaData.ABI @@ -184,6 +189,28 @@ func (_PingPongDemo *PingPongDemoTransactorRaw) Transact(opts *bind.TransactOpts return _PingPongDemo.Contract.contract.Transact(opts, method, params...) } +func (_PingPongDemo *PingPongDemoCaller) ACKMESSAGEHEADER(opts *bind.CallOpts) ([]byte, error) { + var out []interface{} + err := _PingPongDemo.contract.Call(opts, &out, "ACK_MESSAGE_HEADER") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_PingPongDemo *PingPongDemoSession) ACKMESSAGEHEADER() ([]byte, error) { + return _PingPongDemo.Contract.ACKMESSAGEHEADER(&_PingPongDemo.CallOpts) +} + +func (_PingPongDemo *PingPongDemoCallerSession) ACKMESSAGEHEADER() ([]byte, error) { + return _PingPongDemo.Contract.ACKMESSAGEHEADER(&_PingPongDemo.CallOpts) +} + func (_PingPongDemo *PingPongDemoCaller) GetCounterpartAddress(opts *bind.CallOpts) (common.Address, error) { var out []interface{} err := _PingPongDemo.contract.Call(opts, &out, "getCounterpartAddress") @@ -228,26 +255,48 @@ func (_PingPongDemo *PingPongDemoCallerSession) GetCounterpartChainSelector() (u return _PingPongDemo.Contract.GetCounterpartChainSelector(&_PingPongDemo.CallOpts) } -func (_PingPongDemo *PingPongDemoCaller) GetFeeToken(opts *bind.CallOpts) (common.Address, error) { +func (_PingPongDemo *PingPongDemoCaller) GetMessageContents(opts *bind.CallOpts, messageId [32]byte) (ClientAny2EVMMessage, error) { var out []interface{} - err := _PingPongDemo.contract.Call(opts, &out, "getFeeToken") + err := _PingPongDemo.contract.Call(opts, &out, "getMessageContents", messageId) if err != nil { - return *new(common.Address), err + return *new(ClientAny2EVMMessage), err } - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out0 := *abi.ConvertType(out[0], new(ClientAny2EVMMessage)).(*ClientAny2EVMMessage) + + return out0, err + +} + +func (_PingPongDemo *PingPongDemoSession) GetMessageContents(messageId [32]byte) (ClientAny2EVMMessage, error) { + return _PingPongDemo.Contract.GetMessageContents(&_PingPongDemo.CallOpts, messageId) +} + +func (_PingPongDemo *PingPongDemoCallerSession) GetMessageContents(messageId [32]byte) (ClientAny2EVMMessage, error) { + return _PingPongDemo.Contract.GetMessageContents(&_PingPongDemo.CallOpts, messageId) +} + +func (_PingPongDemo *PingPongDemoCaller) GetMessageStatus(opts *bind.CallOpts, messageId [32]byte) (*big.Int, error) { + var out []interface{} + err := _PingPongDemo.contract.Call(opts, &out, "getMessageStatus", messageId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -func (_PingPongDemo *PingPongDemoSession) GetFeeToken() (common.Address, error) { - return _PingPongDemo.Contract.GetFeeToken(&_PingPongDemo.CallOpts) +func (_PingPongDemo *PingPongDemoSession) GetMessageStatus(messageId [32]byte) (*big.Int, error) { + return _PingPongDemo.Contract.GetMessageStatus(&_PingPongDemo.CallOpts, messageId) } -func (_PingPongDemo *PingPongDemoCallerSession) GetFeeToken() (common.Address, error) { - return _PingPongDemo.Contract.GetFeeToken(&_PingPongDemo.CallOpts) +func (_PingPongDemo *PingPongDemoCallerSession) GetMessageStatus(messageId [32]byte) (*big.Int, error) { + return _PingPongDemo.Contract.GetMessageStatus(&_PingPongDemo.CallOpts, messageId) } func (_PingPongDemo *PingPongDemoCaller) GetRouter(opts *bind.CallOpts) (common.Address, error) { @@ -272,6 +321,28 @@ func (_PingPongDemo *PingPongDemoCallerSession) GetRouter() (common.Address, err return _PingPongDemo.Contract.GetRouter(&_PingPongDemo.CallOpts) } +func (_PingPongDemo *PingPongDemoCaller) IsApprovedSender(opts *bind.CallOpts, sourceChainSelector uint64, senderAddr []byte) (bool, error) { + var out []interface{} + err := _PingPongDemo.contract.Call(opts, &out, "isApprovedSender", sourceChainSelector, senderAddr) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_PingPongDemo *PingPongDemoSession) IsApprovedSender(sourceChainSelector uint64, senderAddr []byte) (bool, error) { + return _PingPongDemo.Contract.IsApprovedSender(&_PingPongDemo.CallOpts, sourceChainSelector, senderAddr) +} + +func (_PingPongDemo *PingPongDemoCallerSession) IsApprovedSender(sourceChainSelector uint64, senderAddr []byte) (bool, error) { + return _PingPongDemo.Contract.IsApprovedSender(&_PingPongDemo.CallOpts, sourceChainSelector, senderAddr) +} + func (_PingPongDemo *PingPongDemoCaller) IsPaused(opts *bind.CallOpts) (bool, error) { var out []interface{} err := _PingPongDemo.contract.Call(opts, &out, "isPaused") @@ -316,26 +387,79 @@ func (_PingPongDemo *PingPongDemoCallerSession) Owner() (common.Address, error) return _PingPongDemo.Contract.Owner(&_PingPongDemo.CallOpts) } -func (_PingPongDemo *PingPongDemoCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { +func (_PingPongDemo *PingPongDemoCaller) SChainConfigs(opts *bind.CallOpts, arg0 uint64) (SChainConfigs, + + error) { var out []interface{} - err := _PingPongDemo.contract.Call(opts, &out, "supportsInterface", interfaceId) + err := _PingPongDemo.contract.Call(opts, &out, "s_chainConfigs", arg0) + outstruct := new(SChainConfigs) if err != nil { - return *new(bool), err + return *outstruct, err } - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.Disabled = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.Recipient = *abi.ConvertType(out[1], new([]byte)).(*[]byte) + outstruct.ExtraArgsBytes = *abi.ConvertType(out[2], new([]byte)).(*[]byte) + + return *outstruct, err + +} + +func (_PingPongDemo *PingPongDemoSession) SChainConfigs(arg0 uint64) (SChainConfigs, + + error) { + return _PingPongDemo.Contract.SChainConfigs(&_PingPongDemo.CallOpts, arg0) +} + +func (_PingPongDemo *PingPongDemoCallerSession) SChainConfigs(arg0 uint64) (SChainConfigs, + + error) { + return _PingPongDemo.Contract.SChainConfigs(&_PingPongDemo.CallOpts, arg0) +} + +func (_PingPongDemo *PingPongDemoCaller) SFeeToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _PingPongDemo.contract.Call(opts, &out, "s_feeToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_PingPongDemo *PingPongDemoSession) SFeeToken() (common.Address, error) { + return _PingPongDemo.Contract.SFeeToken(&_PingPongDemo.CallOpts) +} + +func (_PingPongDemo *PingPongDemoCallerSession) SFeeToken() (common.Address, error) { + return _PingPongDemo.Contract.SFeeToken(&_PingPongDemo.CallOpts) +} + +func (_PingPongDemo *PingPongDemoCaller) SMessageStatus(opts *bind.CallOpts, messageId [32]byte) (uint8, error) { + var out []interface{} + err := _PingPongDemo.contract.Call(opts, &out, "s_messageStatus", messageId) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) return out0, err } -func (_PingPongDemo *PingPongDemoSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _PingPongDemo.Contract.SupportsInterface(&_PingPongDemo.CallOpts, interfaceId) +func (_PingPongDemo *PingPongDemoSession) SMessageStatus(messageId [32]byte) (uint8, error) { + return _PingPongDemo.Contract.SMessageStatus(&_PingPongDemo.CallOpts, messageId) } -func (_PingPongDemo *PingPongDemoCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _PingPongDemo.Contract.SupportsInterface(&_PingPongDemo.CallOpts, interfaceId) +func (_PingPongDemo *PingPongDemoCallerSession) SMessageStatus(messageId [32]byte) (uint8, error) { + return _PingPongDemo.Contract.SMessageStatus(&_PingPongDemo.CallOpts, messageId) } func (_PingPongDemo *PingPongDemoCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { @@ -360,6 +484,18 @@ func (_PingPongDemo *PingPongDemoCallerSession) TypeAndVersion() (string, error) return _PingPongDemo.Contract.TypeAndVersion(&_PingPongDemo.CallOpts) } +func (_PingPongDemo *PingPongDemoTransactor) AbandonFailedMessage(opts *bind.TransactOpts, messageId [32]byte, receiver common.Address) (*types.Transaction, error) { + return _PingPongDemo.contract.Transact(opts, "abandonFailedMessage", messageId, receiver) +} + +func (_PingPongDemo *PingPongDemoSession) AbandonFailedMessage(messageId [32]byte, receiver common.Address) (*types.Transaction, error) { + return _PingPongDemo.Contract.AbandonFailedMessage(&_PingPongDemo.TransactOpts, messageId, receiver) +} + +func (_PingPongDemo *PingPongDemoTransactorSession) AbandonFailedMessage(messageId [32]byte, receiver common.Address) (*types.Transaction, error) { + return _PingPongDemo.Contract.AbandonFailedMessage(&_PingPongDemo.TransactOpts, messageId, receiver) +} + func (_PingPongDemo *PingPongDemoTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { return _PingPongDemo.contract.Transact(opts, "acceptOwnership") } @@ -384,6 +520,78 @@ func (_PingPongDemo *PingPongDemoTransactorSession) CcipReceive(message ClientAn return _PingPongDemo.Contract.CcipReceive(&_PingPongDemo.TransactOpts, message) } +func (_PingPongDemo *PingPongDemoTransactor) CcipSend(opts *bind.TransactOpts, destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte) (*types.Transaction, error) { + return _PingPongDemo.contract.Transact(opts, "ccipSend", destChainSelector, tokenAmounts, data) +} + +func (_PingPongDemo *PingPongDemoSession) CcipSend(destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte) (*types.Transaction, error) { + return _PingPongDemo.Contract.CcipSend(&_PingPongDemo.TransactOpts, destChainSelector, tokenAmounts, data) +} + +func (_PingPongDemo *PingPongDemoTransactorSession) CcipSend(destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte) (*types.Transaction, error) { + return _PingPongDemo.Contract.CcipSend(&_PingPongDemo.TransactOpts, destChainSelector, tokenAmounts, data) +} + +func (_PingPongDemo *PingPongDemoTransactor) DisableChain(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) { + return _PingPongDemo.contract.Transact(opts, "disableChain", chainSelector) +} + +func (_PingPongDemo *PingPongDemoSession) DisableChain(chainSelector uint64) (*types.Transaction, error) { + return _PingPongDemo.Contract.DisableChain(&_PingPongDemo.TransactOpts, chainSelector) +} + +func (_PingPongDemo *PingPongDemoTransactorSession) DisableChain(chainSelector uint64) (*types.Transaction, error) { + return _PingPongDemo.Contract.DisableChain(&_PingPongDemo.TransactOpts, chainSelector) +} + +func (_PingPongDemo *PingPongDemoTransactor) EnableChain(opts *bind.TransactOpts, chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _PingPongDemo.contract.Transact(opts, "enableChain", chainSelector, recipient, _extraArgsBytes) +} + +func (_PingPongDemo *PingPongDemoSession) EnableChain(chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _PingPongDemo.Contract.EnableChain(&_PingPongDemo.TransactOpts, chainSelector, recipient, _extraArgsBytes) +} + +func (_PingPongDemo *PingPongDemoTransactorSession) EnableChain(chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _PingPongDemo.Contract.EnableChain(&_PingPongDemo.TransactOpts, chainSelector, recipient, _extraArgsBytes) +} + +func (_PingPongDemo *PingPongDemoTransactor) ModifyFeeToken(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { + return _PingPongDemo.contract.Transact(opts, "modifyFeeToken", token) +} + +func (_PingPongDemo *PingPongDemoSession) ModifyFeeToken(token common.Address) (*types.Transaction, error) { + return _PingPongDemo.Contract.ModifyFeeToken(&_PingPongDemo.TransactOpts, token) +} + +func (_PingPongDemo *PingPongDemoTransactorSession) ModifyFeeToken(token common.Address) (*types.Transaction, error) { + return _PingPongDemo.Contract.ModifyFeeToken(&_PingPongDemo.TransactOpts, token) +} + +func (_PingPongDemo *PingPongDemoTransactor) ProcessMessage(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) { + return _PingPongDemo.contract.Transact(opts, "processMessage", message) +} + +func (_PingPongDemo *PingPongDemoSession) ProcessMessage(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _PingPongDemo.Contract.ProcessMessage(&_PingPongDemo.TransactOpts, message) +} + +func (_PingPongDemo *PingPongDemoTransactorSession) ProcessMessage(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _PingPongDemo.Contract.ProcessMessage(&_PingPongDemo.TransactOpts, message) +} + +func (_PingPongDemo *PingPongDemoTransactor) RetryFailedMessage(opts *bind.TransactOpts, messageId [32]byte) (*types.Transaction, error) { + return _PingPongDemo.contract.Transact(opts, "retryFailedMessage", messageId) +} + +func (_PingPongDemo *PingPongDemoSession) RetryFailedMessage(messageId [32]byte) (*types.Transaction, error) { + return _PingPongDemo.Contract.RetryFailedMessage(&_PingPongDemo.TransactOpts, messageId) +} + +func (_PingPongDemo *PingPongDemoTransactorSession) RetryFailedMessage(messageId [32]byte) (*types.Transaction, error) { + return _PingPongDemo.Contract.RetryFailedMessage(&_PingPongDemo.TransactOpts, messageId) +} + func (_PingPongDemo *PingPongDemoTransactor) SetCounterpart(opts *bind.TransactOpts, counterpartChainSelector uint64, counterpartAddress common.Address) (*types.Transaction, error) { return _PingPongDemo.contract.Transact(opts, "setCounterpart", counterpartChainSelector, counterpartAddress) } @@ -396,28 +604,28 @@ func (_PingPongDemo *PingPongDemoTransactorSession) SetCounterpart(counterpartCh return _PingPongDemo.Contract.SetCounterpart(&_PingPongDemo.TransactOpts, counterpartChainSelector, counterpartAddress) } -func (_PingPongDemo *PingPongDemoTransactor) SetCounterpartAddress(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) { - return _PingPongDemo.contract.Transact(opts, "setCounterpartAddress", addr) +func (_PingPongDemo *PingPongDemoTransactor) SetCounterpartAddress(opts *bind.TransactOpts, counterpartAddress common.Address) (*types.Transaction, error) { + return _PingPongDemo.contract.Transact(opts, "setCounterpartAddress", counterpartAddress) } -func (_PingPongDemo *PingPongDemoSession) SetCounterpartAddress(addr common.Address) (*types.Transaction, error) { - return _PingPongDemo.Contract.SetCounterpartAddress(&_PingPongDemo.TransactOpts, addr) +func (_PingPongDemo *PingPongDemoSession) SetCounterpartAddress(counterpartAddress common.Address) (*types.Transaction, error) { + return _PingPongDemo.Contract.SetCounterpartAddress(&_PingPongDemo.TransactOpts, counterpartAddress) } -func (_PingPongDemo *PingPongDemoTransactorSession) SetCounterpartAddress(addr common.Address) (*types.Transaction, error) { - return _PingPongDemo.Contract.SetCounterpartAddress(&_PingPongDemo.TransactOpts, addr) +func (_PingPongDemo *PingPongDemoTransactorSession) SetCounterpartAddress(counterpartAddress common.Address) (*types.Transaction, error) { + return _PingPongDemo.Contract.SetCounterpartAddress(&_PingPongDemo.TransactOpts, counterpartAddress) } -func (_PingPongDemo *PingPongDemoTransactor) SetCounterpartChainSelector(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) { - return _PingPongDemo.contract.Transact(opts, "setCounterpartChainSelector", chainSelector) +func (_PingPongDemo *PingPongDemoTransactor) SetCounterpartChainSelector(opts *bind.TransactOpts, counterpartChainSelector uint64) (*types.Transaction, error) { + return _PingPongDemo.contract.Transact(opts, "setCounterpartChainSelector", counterpartChainSelector) } -func (_PingPongDemo *PingPongDemoSession) SetCounterpartChainSelector(chainSelector uint64) (*types.Transaction, error) { - return _PingPongDemo.Contract.SetCounterpartChainSelector(&_PingPongDemo.TransactOpts, chainSelector) +func (_PingPongDemo *PingPongDemoSession) SetCounterpartChainSelector(counterpartChainSelector uint64) (*types.Transaction, error) { + return _PingPongDemo.Contract.SetCounterpartChainSelector(&_PingPongDemo.TransactOpts, counterpartChainSelector) } -func (_PingPongDemo *PingPongDemoTransactorSession) SetCounterpartChainSelector(chainSelector uint64) (*types.Transaction, error) { - return _PingPongDemo.Contract.SetCounterpartChainSelector(&_PingPongDemo.TransactOpts, chainSelector) +func (_PingPongDemo *PingPongDemoTransactorSession) SetCounterpartChainSelector(counterpartChainSelector uint64) (*types.Transaction, error) { + return _PingPongDemo.Contract.SetCounterpartChainSelector(&_PingPongDemo.TransactOpts, counterpartChainSelector) } func (_PingPongDemo *PingPongDemoTransactor) SetPaused(opts *bind.TransactOpts, pause bool) (*types.Transaction, error) { @@ -456,8 +664,56 @@ func (_PingPongDemo *PingPongDemoTransactorSession) TransferOwnership(to common. return _PingPongDemo.Contract.TransferOwnership(&_PingPongDemo.TransactOpts, to) } -type PingPongDemoOwnershipTransferRequestedIterator struct { - Event *PingPongDemoOwnershipTransferRequested +func (_PingPongDemo *PingPongDemoTransactor) UpdateApprovedSenders(opts *bind.TransactOpts, adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _PingPongDemo.contract.Transact(opts, "updateApprovedSenders", adds, removes) +} + +func (_PingPongDemo *PingPongDemoSession) UpdateApprovedSenders(adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _PingPongDemo.Contract.UpdateApprovedSenders(&_PingPongDemo.TransactOpts, adds, removes) +} + +func (_PingPongDemo *PingPongDemoTransactorSession) UpdateApprovedSenders(adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _PingPongDemo.Contract.UpdateApprovedSenders(&_PingPongDemo.TransactOpts, adds, removes) +} + +func (_PingPongDemo *PingPongDemoTransactor) WithdrawNativeToken(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _PingPongDemo.contract.Transact(opts, "withdrawNativeToken", to, amount) +} + +func (_PingPongDemo *PingPongDemoSession) WithdrawNativeToken(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _PingPongDemo.Contract.WithdrawNativeToken(&_PingPongDemo.TransactOpts, to, amount) +} + +func (_PingPongDemo *PingPongDemoTransactorSession) WithdrawNativeToken(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _PingPongDemo.Contract.WithdrawNativeToken(&_PingPongDemo.TransactOpts, to, amount) +} + +func (_PingPongDemo *PingPongDemoTransactor) WithdrawTokens(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _PingPongDemo.contract.Transact(opts, "withdrawTokens", token, to, amount) +} + +func (_PingPongDemo *PingPongDemoSession) WithdrawTokens(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _PingPongDemo.Contract.WithdrawTokens(&_PingPongDemo.TransactOpts, token, to, amount) +} + +func (_PingPongDemo *PingPongDemoTransactorSession) WithdrawTokens(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _PingPongDemo.Contract.WithdrawTokens(&_PingPongDemo.TransactOpts, token, to, amount) +} + +func (_PingPongDemo *PingPongDemoTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PingPongDemo.contract.RawTransact(opts, nil) +} + +func (_PingPongDemo *PingPongDemoSession) Receive() (*types.Transaction, error) { + return _PingPongDemo.Contract.Receive(&_PingPongDemo.TransactOpts) +} + +func (_PingPongDemo *PingPongDemoTransactorSession) Receive() (*types.Transaction, error) { + return _PingPongDemo.Contract.Receive(&_PingPongDemo.TransactOpts) +} + +type PingPongDemoFeeTokenModifiedIterator struct { + Event *PingPongDemoFeeTokenModified contract *bind.BoundContract event string @@ -468,7 +724,7 @@ type PingPongDemoOwnershipTransferRequestedIterator struct { fail error } -func (it *PingPongDemoOwnershipTransferRequestedIterator) Next() bool { +func (it *PingPongDemoFeeTokenModifiedIterator) Next() bool { if it.fail != nil { return false @@ -477,7 +733,7 @@ func (it *PingPongDemoOwnershipTransferRequestedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PingPongDemoOwnershipTransferRequested) + it.Event = new(PingPongDemoFeeTokenModified) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -492,7 +748,7 @@ func (it *PingPongDemoOwnershipTransferRequestedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(PingPongDemoOwnershipTransferRequested) + it.Event = new(PingPongDemoFeeTokenModified) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -507,51 +763,51 @@ func (it *PingPongDemoOwnershipTransferRequestedIterator) Next() bool { } } -func (it *PingPongDemoOwnershipTransferRequestedIterator) Error() error { +func (it *PingPongDemoFeeTokenModifiedIterator) Error() error { return it.fail } -func (it *PingPongDemoOwnershipTransferRequestedIterator) Close() error { +func (it *PingPongDemoFeeTokenModifiedIterator) Close() error { it.sub.Unsubscribe() return nil } -type PingPongDemoOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log +type PingPongDemoFeeTokenModified struct { + OldToken common.Address + NewToken common.Address + Raw types.Log } -func (_PingPongDemo *PingPongDemoFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PingPongDemoOwnershipTransferRequestedIterator, error) { +func (_PingPongDemo *PingPongDemoFilterer) FilterFeeTokenModified(opts *bind.FilterOpts, oldToken []common.Address, newToken []common.Address) (*PingPongDemoFeeTokenModifiedIterator, error) { - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) + var oldTokenRule []interface{} + for _, oldTokenItem := range oldToken { + oldTokenRule = append(oldTokenRule, oldTokenItem) } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) + var newTokenRule []interface{} + for _, newTokenItem := range newToken { + newTokenRule = append(newTokenRule, newTokenItem) } - logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "FeeTokenModified", oldTokenRule, newTokenRule) if err != nil { return nil, err } - return &PingPongDemoOwnershipTransferRequestedIterator{contract: _PingPongDemo.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil + return &PingPongDemoFeeTokenModifiedIterator{contract: _PingPongDemo.contract, event: "FeeTokenModified", logs: logs, sub: sub}, nil } -func (_PingPongDemo *PingPongDemoFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *PingPongDemoOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_PingPongDemo *PingPongDemoFilterer) WatchFeeTokenModified(opts *bind.WatchOpts, sink chan<- *PingPongDemoFeeTokenModified, oldToken []common.Address, newToken []common.Address) (event.Subscription, error) { - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) + var oldTokenRule []interface{} + for _, oldTokenItem := range oldToken { + oldTokenRule = append(oldTokenRule, oldTokenItem) } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) + var newTokenRule []interface{} + for _, newTokenItem := range newToken { + newTokenRule = append(newTokenRule, newTokenItem) } - logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "FeeTokenModified", oldTokenRule, newTokenRule) if err != nil { return nil, err } @@ -561,8 +817,8 @@ func (_PingPongDemo *PingPongDemoFilterer) WatchOwnershipTransferRequested(opts select { case log := <-logs: - event := new(PingPongDemoOwnershipTransferRequested) - if err := _PingPongDemo.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + event := new(PingPongDemoFeeTokenModified) + if err := _PingPongDemo.contract.UnpackLog(event, "FeeTokenModified", log); err != nil { return err } event.Raw = log @@ -583,17 +839,17 @@ func (_PingPongDemo *PingPongDemoFilterer) WatchOwnershipTransferRequested(opts }), nil } -func (_PingPongDemo *PingPongDemoFilterer) ParseOwnershipTransferRequested(log types.Log) (*PingPongDemoOwnershipTransferRequested, error) { - event := new(PingPongDemoOwnershipTransferRequested) - if err := _PingPongDemo.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { +func (_PingPongDemo *PingPongDemoFilterer) ParseFeeTokenModified(log types.Log) (*PingPongDemoFeeTokenModified, error) { + event := new(PingPongDemoFeeTokenModified) + if err := _PingPongDemo.contract.UnpackLog(event, "FeeTokenModified", log); err != nil { return nil, err } event.Raw = log return event, nil } -type PingPongDemoOwnershipTransferredIterator struct { - Event *PingPongDemoOwnershipTransferred +type PingPongDemoMessageAbandonedIterator struct { + Event *PingPongDemoMessageAbandoned contract *bind.BoundContract event string @@ -604,7 +860,7 @@ type PingPongDemoOwnershipTransferredIterator struct { fail error } -func (it *PingPongDemoOwnershipTransferredIterator) Next() bool { +func (it *PingPongDemoMessageAbandonedIterator) Next() bool { if it.fail != nil { return false @@ -613,7 +869,7 @@ func (it *PingPongDemoOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PingPongDemoOwnershipTransferred) + it.Event = new(PingPongDemoMessageAbandoned) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -628,7 +884,7 @@ func (it *PingPongDemoOwnershipTransferredIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(PingPongDemoOwnershipTransferred) + it.Event = new(PingPongDemoMessageAbandoned) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -643,51 +899,43 @@ func (it *PingPongDemoOwnershipTransferredIterator) Next() bool { } } -func (it *PingPongDemoOwnershipTransferredIterator) Error() error { +func (it *PingPongDemoMessageAbandonedIterator) Error() error { return it.fail } -func (it *PingPongDemoOwnershipTransferredIterator) Close() error { +func (it *PingPongDemoMessageAbandonedIterator) Close() error { it.sub.Unsubscribe() return nil } -type PingPongDemoOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log +type PingPongDemoMessageAbandoned struct { + MessageId [32]byte + TokenReceiver common.Address + Raw types.Log } -func (_PingPongDemo *PingPongDemoFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PingPongDemoOwnershipTransferredIterator, error) { +func (_PingPongDemo *PingPongDemoFilterer) FilterMessageAbandoned(opts *bind.FilterOpts, messageId [][32]byte) (*PingPongDemoMessageAbandonedIterator, error) { - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) } - logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "MessageAbandoned", messageIdRule) if err != nil { return nil, err } - return &PingPongDemoOwnershipTransferredIterator{contract: _PingPongDemo.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return &PingPongDemoMessageAbandonedIterator{contract: _PingPongDemo.contract, event: "MessageAbandoned", logs: logs, sub: sub}, nil } -func (_PingPongDemo *PingPongDemoFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *PingPongDemoOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_PingPongDemo *PingPongDemoFilterer) WatchMessageAbandoned(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageAbandoned, messageId [][32]byte) (event.Subscription, error) { - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) } - logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "MessageAbandoned", messageIdRule) if err != nil { return nil, err } @@ -697,8 +945,8 @@ func (_PingPongDemo *PingPongDemoFilterer) WatchOwnershipTransferred(opts *bind. select { case log := <-logs: - event := new(PingPongDemoOwnershipTransferred) - if err := _PingPongDemo.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(PingPongDemoMessageAbandoned) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageAbandoned", log); err != nil { return err } event.Raw = log @@ -719,17 +967,17 @@ func (_PingPongDemo *PingPongDemoFilterer) WatchOwnershipTransferred(opts *bind. }), nil } -func (_PingPongDemo *PingPongDemoFilterer) ParseOwnershipTransferred(log types.Log) (*PingPongDemoOwnershipTransferred, error) { - event := new(PingPongDemoOwnershipTransferred) - if err := _PingPongDemo.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +func (_PingPongDemo *PingPongDemoFilterer) ParseMessageAbandoned(log types.Log) (*PingPongDemoMessageAbandoned, error) { + event := new(PingPongDemoMessageAbandoned) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageAbandoned", log); err != nil { return nil, err } event.Raw = log return event, nil } -type PingPongDemoPingIterator struct { - Event *PingPongDemoPing +type PingPongDemoMessageAckReceivedIterator struct { + Event *PingPongDemoMessageAckReceived contract *bind.BoundContract event string @@ -740,7 +988,7 @@ type PingPongDemoPingIterator struct { fail error } -func (it *PingPongDemoPingIterator) Next() bool { +func (it *PingPongDemoMessageAckReceivedIterator) Next() bool { if it.fail != nil { return false @@ -749,7 +997,7 @@ func (it *PingPongDemoPingIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PingPongDemoPing) + it.Event = new(PingPongDemoMessageAckReceived) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -764,7 +1012,7 @@ func (it *PingPongDemoPingIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(PingPongDemoPing) + it.Event = new(PingPongDemoMessageAckReceived) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -779,32 +1027,32 @@ func (it *PingPongDemoPingIterator) Next() bool { } } -func (it *PingPongDemoPingIterator) Error() error { +func (it *PingPongDemoMessageAckReceivedIterator) Error() error { return it.fail } -func (it *PingPongDemoPingIterator) Close() error { +func (it *PingPongDemoMessageAckReceivedIterator) Close() error { it.sub.Unsubscribe() return nil } -type PingPongDemoPing struct { - PingPongCount *big.Int - Raw types.Log +type PingPongDemoMessageAckReceived struct { + Arg0 [32]byte + Raw types.Log } -func (_PingPongDemo *PingPongDemoFilterer) FilterPing(opts *bind.FilterOpts) (*PingPongDemoPingIterator, error) { +func (_PingPongDemo *PingPongDemoFilterer) FilterMessageAckReceived(opts *bind.FilterOpts) (*PingPongDemoMessageAckReceivedIterator, error) { - logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "Ping") + logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "MessageAckReceived") if err != nil { return nil, err } - return &PingPongDemoPingIterator{contract: _PingPongDemo.contract, event: "Ping", logs: logs, sub: sub}, nil + return &PingPongDemoMessageAckReceivedIterator{contract: _PingPongDemo.contract, event: "MessageAckReceived", logs: logs, sub: sub}, nil } -func (_PingPongDemo *PingPongDemoFilterer) WatchPing(opts *bind.WatchOpts, sink chan<- *PingPongDemoPing) (event.Subscription, error) { +func (_PingPongDemo *PingPongDemoFilterer) WatchMessageAckReceived(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageAckReceived) (event.Subscription, error) { - logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "Ping") + logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "MessageAckReceived") if err != nil { return nil, err } @@ -814,8 +1062,8 @@ func (_PingPongDemo *PingPongDemoFilterer) WatchPing(opts *bind.WatchOpts, sink select { case log := <-logs: - event := new(PingPongDemoPing) - if err := _PingPongDemo.contract.UnpackLog(event, "Ping", log); err != nil { + event := new(PingPongDemoMessageAckReceived) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageAckReceived", log); err != nil { return err } event.Raw = log @@ -836,17 +1084,17 @@ func (_PingPongDemo *PingPongDemoFilterer) WatchPing(opts *bind.WatchOpts, sink }), nil } -func (_PingPongDemo *PingPongDemoFilterer) ParsePing(log types.Log) (*PingPongDemoPing, error) { - event := new(PingPongDemoPing) - if err := _PingPongDemo.contract.UnpackLog(event, "Ping", log); err != nil { +func (_PingPongDemo *PingPongDemoFilterer) ParseMessageAckReceived(log types.Log) (*PingPongDemoMessageAckReceived, error) { + event := new(PingPongDemoMessageAckReceived) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageAckReceived", log); err != nil { return nil, err } event.Raw = log return event, nil } -type PingPongDemoPongIterator struct { - Event *PingPongDemoPong +type PingPongDemoMessageAckSentIterator struct { + Event *PingPongDemoMessageAckSent contract *bind.BoundContract event string @@ -857,7 +1105,7 @@ type PingPongDemoPongIterator struct { fail error } -func (it *PingPongDemoPongIterator) Next() bool { +func (it *PingPongDemoMessageAckSentIterator) Next() bool { if it.fail != nil { return false @@ -866,7 +1114,7 @@ func (it *PingPongDemoPongIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PingPongDemoPong) + it.Event = new(PingPongDemoMessageAckSent) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -881,7 +1129,7 @@ func (it *PingPongDemoPongIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(PingPongDemoPong) + it.Event = new(PingPongDemoMessageAckSent) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -896,32 +1144,32 @@ func (it *PingPongDemoPongIterator) Next() bool { } } -func (it *PingPongDemoPongIterator) Error() error { +func (it *PingPongDemoMessageAckSentIterator) Error() error { return it.fail } -func (it *PingPongDemoPongIterator) Close() error { +func (it *PingPongDemoMessageAckSentIterator) Close() error { it.sub.Unsubscribe() return nil } -type PingPongDemoPong struct { - PingPongCount *big.Int - Raw types.Log +type PingPongDemoMessageAckSent struct { + IncomingMessageId [32]byte + Raw types.Log } -func (_PingPongDemo *PingPongDemoFilterer) FilterPong(opts *bind.FilterOpts) (*PingPongDemoPongIterator, error) { +func (_PingPongDemo *PingPongDemoFilterer) FilterMessageAckSent(opts *bind.FilterOpts) (*PingPongDemoMessageAckSentIterator, error) { - logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "Pong") + logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "MessageAckSent") if err != nil { return nil, err } - return &PingPongDemoPongIterator{contract: _PingPongDemo.contract, event: "Pong", logs: logs, sub: sub}, nil + return &PingPongDemoMessageAckSentIterator{contract: _PingPongDemo.contract, event: "MessageAckSent", logs: logs, sub: sub}, nil } -func (_PingPongDemo *PingPongDemoFilterer) WatchPong(opts *bind.WatchOpts, sink chan<- *PingPongDemoPong) (event.Subscription, error) { +func (_PingPongDemo *PingPongDemoFilterer) WatchMessageAckSent(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageAckSent) (event.Subscription, error) { - logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "Pong") + logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "MessageAckSent") if err != nil { return nil, err } @@ -931,8 +1179,8 @@ func (_PingPongDemo *PingPongDemoFilterer) WatchPong(opts *bind.WatchOpts, sink select { case log := <-logs: - event := new(PingPongDemoPong) - if err := _PingPongDemo.contract.UnpackLog(event, "Pong", log); err != nil { + event := new(PingPongDemoMessageAckSent) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageAckSent", log); err != nil { return err } event.Raw = log @@ -953,7 +1201,1031 @@ func (_PingPongDemo *PingPongDemoFilterer) WatchPong(opts *bind.WatchOpts, sink }), nil } -func (_PingPongDemo *PingPongDemoFilterer) ParsePong(log types.Log) (*PingPongDemoPong, error) { +func (_PingPongDemo *PingPongDemoFilterer) ParseMessageAckSent(log types.Log) (*PingPongDemoMessageAckSent, error) { + event := new(PingPongDemoMessageAckSent) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageAckSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PingPongDemoMessageFailedIterator struct { + Event *PingPongDemoMessageFailed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PingPongDemoMessageFailedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PingPongDemoMessageFailed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PingPongDemoMessageFailed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PingPongDemoMessageFailedIterator) Error() error { + return it.fail +} + +func (it *PingPongDemoMessageFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PingPongDemoMessageFailed struct { + MessageId [32]byte + Reason []byte + Raw types.Log +} + +func (_PingPongDemo *PingPongDemoFilterer) FilterMessageFailed(opts *bind.FilterOpts, messageId [][32]byte) (*PingPongDemoMessageFailedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "MessageFailed", messageIdRule) + if err != nil { + return nil, err + } + return &PingPongDemoMessageFailedIterator{contract: _PingPongDemo.contract, event: "MessageFailed", logs: logs, sub: sub}, nil +} + +func (_PingPongDemo *PingPongDemoFilterer) WatchMessageFailed(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageFailed, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "MessageFailed", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PingPongDemoMessageFailed) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageFailed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PingPongDemo *PingPongDemoFilterer) ParseMessageFailed(log types.Log) (*PingPongDemoMessageFailed, error) { + event := new(PingPongDemoMessageFailed) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PingPongDemoMessageRecoveredIterator struct { + Event *PingPongDemoMessageRecovered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PingPongDemoMessageRecoveredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PingPongDemoMessageRecovered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PingPongDemoMessageRecovered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PingPongDemoMessageRecoveredIterator) Error() error { + return it.fail +} + +func (it *PingPongDemoMessageRecoveredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PingPongDemoMessageRecovered struct { + MessageId [32]byte + Raw types.Log +} + +func (_PingPongDemo *PingPongDemoFilterer) FilterMessageRecovered(opts *bind.FilterOpts, messageId [][32]byte) (*PingPongDemoMessageRecoveredIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "MessageRecovered", messageIdRule) + if err != nil { + return nil, err + } + return &PingPongDemoMessageRecoveredIterator{contract: _PingPongDemo.contract, event: "MessageRecovered", logs: logs, sub: sub}, nil +} + +func (_PingPongDemo *PingPongDemoFilterer) WatchMessageRecovered(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageRecovered, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "MessageRecovered", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PingPongDemoMessageRecovered) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageRecovered", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PingPongDemo *PingPongDemoFilterer) ParseMessageRecovered(log types.Log) (*PingPongDemoMessageRecovered, error) { + event := new(PingPongDemoMessageRecovered) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageRecovered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PingPongDemoMessageSentIterator struct { + Event *PingPongDemoMessageSent + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PingPongDemoMessageSentIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PingPongDemoMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PingPongDemoMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PingPongDemoMessageSentIterator) Error() error { + return it.fail +} + +func (it *PingPongDemoMessageSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PingPongDemoMessageSent struct { + IncomingMessageId [32]byte + ACKMessageId [32]byte + Raw types.Log +} + +func (_PingPongDemo *PingPongDemoFilterer) FilterMessageSent(opts *bind.FilterOpts, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (*PingPongDemoMessageSentIterator, error) { + + var incomingMessageIdRule []interface{} + for _, incomingMessageIdItem := range incomingMessageId { + incomingMessageIdRule = append(incomingMessageIdRule, incomingMessageIdItem) + } + var ACKMessageIdRule []interface{} + for _, ACKMessageIdItem := range ACKMessageId { + ACKMessageIdRule = append(ACKMessageIdRule, ACKMessageIdItem) + } + + logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "MessageSent", incomingMessageIdRule, ACKMessageIdRule) + if err != nil { + return nil, err + } + return &PingPongDemoMessageSentIterator{contract: _PingPongDemo.contract, event: "MessageSent", logs: logs, sub: sub}, nil +} + +func (_PingPongDemo *PingPongDemoFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageSent, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (event.Subscription, error) { + + var incomingMessageIdRule []interface{} + for _, incomingMessageIdItem := range incomingMessageId { + incomingMessageIdRule = append(incomingMessageIdRule, incomingMessageIdItem) + } + var ACKMessageIdRule []interface{} + for _, ACKMessageIdItem := range ACKMessageId { + ACKMessageIdRule = append(ACKMessageIdRule, ACKMessageIdItem) + } + + logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "MessageSent", incomingMessageIdRule, ACKMessageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PingPongDemoMessageSent) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageSent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PingPongDemo *PingPongDemoFilterer) ParseMessageSent(log types.Log) (*PingPongDemoMessageSent, error) { + event := new(PingPongDemoMessageSent) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PingPongDemoMessageSucceededIterator struct { + Event *PingPongDemoMessageSucceeded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PingPongDemoMessageSucceededIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PingPongDemoMessageSucceeded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PingPongDemoMessageSucceeded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PingPongDemoMessageSucceededIterator) Error() error { + return it.fail +} + +func (it *PingPongDemoMessageSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PingPongDemoMessageSucceeded struct { + MessageId [32]byte + Raw types.Log +} + +func (_PingPongDemo *PingPongDemoFilterer) FilterMessageSucceeded(opts *bind.FilterOpts, messageId [][32]byte) (*PingPongDemoMessageSucceededIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "MessageSucceeded", messageIdRule) + if err != nil { + return nil, err + } + return &PingPongDemoMessageSucceededIterator{contract: _PingPongDemo.contract, event: "MessageSucceeded", logs: logs, sub: sub}, nil +} + +func (_PingPongDemo *PingPongDemoFilterer) WatchMessageSucceeded(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageSucceeded, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "MessageSucceeded", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PingPongDemoMessageSucceeded) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageSucceeded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PingPongDemo *PingPongDemoFilterer) ParseMessageSucceeded(log types.Log) (*PingPongDemoMessageSucceeded, error) { + event := new(PingPongDemoMessageSucceeded) + if err := _PingPongDemo.contract.UnpackLog(event, "MessageSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PingPongDemoOwnershipTransferRequestedIterator struct { + Event *PingPongDemoOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PingPongDemoOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PingPongDemoOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PingPongDemoOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PingPongDemoOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *PingPongDemoOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PingPongDemoOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_PingPongDemo *PingPongDemoFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PingPongDemoOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &PingPongDemoOwnershipTransferRequestedIterator{contract: _PingPongDemo.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_PingPongDemo *PingPongDemoFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *PingPongDemoOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PingPongDemoOwnershipTransferRequested) + if err := _PingPongDemo.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PingPongDemo *PingPongDemoFilterer) ParseOwnershipTransferRequested(log types.Log) (*PingPongDemoOwnershipTransferRequested, error) { + event := new(PingPongDemoOwnershipTransferRequested) + if err := _PingPongDemo.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PingPongDemoOwnershipTransferredIterator struct { + Event *PingPongDemoOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PingPongDemoOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PingPongDemoOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PingPongDemoOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PingPongDemoOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *PingPongDemoOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PingPongDemoOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_PingPongDemo *PingPongDemoFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PingPongDemoOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &PingPongDemoOwnershipTransferredIterator{contract: _PingPongDemo.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_PingPongDemo *PingPongDemoFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *PingPongDemoOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PingPongDemoOwnershipTransferred) + if err := _PingPongDemo.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PingPongDemo *PingPongDemoFilterer) ParseOwnershipTransferred(log types.Log) (*PingPongDemoOwnershipTransferred, error) { + event := new(PingPongDemoOwnershipTransferred) + if err := _PingPongDemo.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PingPongDemoPingIterator struct { + Event *PingPongDemoPing + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PingPongDemoPingIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PingPongDemoPing) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PingPongDemoPing) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PingPongDemoPingIterator) Error() error { + return it.fail +} + +func (it *PingPongDemoPingIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PingPongDemoPing struct { + PingPongCount *big.Int + Raw types.Log +} + +func (_PingPongDemo *PingPongDemoFilterer) FilterPing(opts *bind.FilterOpts) (*PingPongDemoPingIterator, error) { + + logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "Ping") + if err != nil { + return nil, err + } + return &PingPongDemoPingIterator{contract: _PingPongDemo.contract, event: "Ping", logs: logs, sub: sub}, nil +} + +func (_PingPongDemo *PingPongDemoFilterer) WatchPing(opts *bind.WatchOpts, sink chan<- *PingPongDemoPing) (event.Subscription, error) { + + logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "Ping") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PingPongDemoPing) + if err := _PingPongDemo.contract.UnpackLog(event, "Ping", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PingPongDemo *PingPongDemoFilterer) ParsePing(log types.Log) (*PingPongDemoPing, error) { + event := new(PingPongDemoPing) + if err := _PingPongDemo.contract.UnpackLog(event, "Ping", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PingPongDemoPongIterator struct { + Event *PingPongDemoPong + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PingPongDemoPongIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PingPongDemoPong) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PingPongDemoPong) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PingPongDemoPongIterator) Error() error { + return it.fail +} + +func (it *PingPongDemoPongIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PingPongDemoPong struct { + PingPongCount *big.Int + Raw types.Log +} + +func (_PingPongDemo *PingPongDemoFilterer) FilterPong(opts *bind.FilterOpts) (*PingPongDemoPongIterator, error) { + + logs, sub, err := _PingPongDemo.contract.FilterLogs(opts, "Pong") + if err != nil { + return nil, err + } + return &PingPongDemoPongIterator{contract: _PingPongDemo.contract, event: "Pong", logs: logs, sub: sub}, nil +} + +func (_PingPongDemo *PingPongDemoFilterer) WatchPong(opts *bind.WatchOpts, sink chan<- *PingPongDemoPong) (event.Subscription, error) { + + logs, sub, err := _PingPongDemo.contract.WatchLogs(opts, "Pong") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PingPongDemoPong) + if err := _PingPongDemo.contract.UnpackLog(event, "Pong", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PingPongDemo *PingPongDemoFilterer) ParsePong(log types.Log) (*PingPongDemoPong, error) { event := new(PingPongDemoPong) if err := _PingPongDemo.contract.UnpackLog(event, "Pong", log); err != nil { return nil, err @@ -962,8 +2234,30 @@ func (_PingPongDemo *PingPongDemoFilterer) ParsePong(log types.Log) (*PingPongDe return event, nil } +type SChainConfigs struct { + Disabled bool + Recipient []byte + ExtraArgsBytes []byte +} + func (_PingPongDemo *PingPongDemo) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { + case _PingPongDemo.abi.Events["FeeTokenModified"].ID: + return _PingPongDemo.ParseFeeTokenModified(log) + case _PingPongDemo.abi.Events["MessageAbandoned"].ID: + return _PingPongDemo.ParseMessageAbandoned(log) + case _PingPongDemo.abi.Events["MessageAckReceived"].ID: + return _PingPongDemo.ParseMessageAckReceived(log) + case _PingPongDemo.abi.Events["MessageAckSent"].ID: + return _PingPongDemo.ParseMessageAckSent(log) + case _PingPongDemo.abi.Events["MessageFailed"].ID: + return _PingPongDemo.ParseMessageFailed(log) + case _PingPongDemo.abi.Events["MessageRecovered"].ID: + return _PingPongDemo.ParseMessageRecovered(log) + case _PingPongDemo.abi.Events["MessageSent"].ID: + return _PingPongDemo.ParseMessageSent(log) + case _PingPongDemo.abi.Events["MessageSucceeded"].ID: + return _PingPongDemo.ParseMessageSucceeded(log) case _PingPongDemo.abi.Events["OwnershipTransferRequested"].ID: return _PingPongDemo.ParseOwnershipTransferRequested(log) case _PingPongDemo.abi.Events["OwnershipTransferred"].ID: @@ -978,6 +2272,38 @@ func (_PingPongDemo *PingPongDemo) ParseLog(log types.Log) (generated.AbigenLog, } } +func (PingPongDemoFeeTokenModified) Topic() common.Hash { + return common.HexToHash("0x4a1cb6b940121ea2ba30fb9b494035cbfe2d4b6b080db8b502150410bef7eb4e") +} + +func (PingPongDemoMessageAbandoned) Topic() common.Hash { + return common.HexToHash("0xd5038100bd3dc9631d3c3f4f61a3e53e9d466f40c47af9897292c7b35e32a957") +} + +func (PingPongDemoMessageAckReceived) Topic() common.Hash { + return common.HexToHash("0xef0cb160d3dc564cde61ae97d9981f9c4d92ace727a2ec202b18b223ea832a79") +} + +func (PingPongDemoMessageAckSent) Topic() common.Hash { + return common.HexToHash("0x75944f95ba0be568cb30faeb0ef135cb73d07006939da29722d670a97f5c5b26") +} + +func (PingPongDemoMessageFailed) Topic() common.Hash { + return common.HexToHash("0x55bc02a9ef6f146737edeeb425738006f67f077e7138de3bf84a15bde1a5b56f") +} + +func (PingPongDemoMessageRecovered) Topic() common.Hash { + return common.HexToHash("0xef3bf8c64bc480286c4f3503b870ceb23e648d2d902e31fb7bb46680da6de8ad") +} + +func (PingPongDemoMessageSent) Topic() common.Hash { + return common.HexToHash("0x9102b9031c3c59d8320bf14d84d7d7a3434366b91032fad1c87579cfc62b2372") +} + +func (PingPongDemoMessageSucceeded) Topic() common.Hash { + return common.HexToHash("0xdf6958669026659bac75ba986685e11a7d271284989f565f2802522663e9a70f") +} + func (PingPongDemoOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } @@ -999,31 +2325,57 @@ func (_PingPongDemo *PingPongDemo) Address() common.Address { } type PingPongDemoInterface interface { + ACKMESSAGEHEADER(opts *bind.CallOpts) ([]byte, error) + GetCounterpartAddress(opts *bind.CallOpts) (common.Address, error) GetCounterpartChainSelector(opts *bind.CallOpts) (uint64, error) - GetFeeToken(opts *bind.CallOpts) (common.Address, error) + GetMessageContents(opts *bind.CallOpts, messageId [32]byte) (ClientAny2EVMMessage, error) + + GetMessageStatus(opts *bind.CallOpts, messageId [32]byte) (*big.Int, error) GetRouter(opts *bind.CallOpts) (common.Address, error) + IsApprovedSender(opts *bind.CallOpts, sourceChainSelector uint64, senderAddr []byte) (bool, error) + IsPaused(opts *bind.CallOpts) (bool, error) Owner(opts *bind.CallOpts) (common.Address, error) - SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) + SChainConfigs(opts *bind.CallOpts, arg0 uint64) (SChainConfigs, + + error) + + SFeeToken(opts *bind.CallOpts) (common.Address, error) + + SMessageStatus(opts *bind.CallOpts, messageId [32]byte) (uint8, error) TypeAndVersion(opts *bind.CallOpts) (string, error) + AbandonFailedMessage(opts *bind.TransactOpts, messageId [32]byte, receiver common.Address) (*types.Transaction, error) + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) CcipReceive(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) + CcipSend(opts *bind.TransactOpts, destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte) (*types.Transaction, error) + + DisableChain(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) + + EnableChain(opts *bind.TransactOpts, chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) + + ModifyFeeToken(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) + + ProcessMessage(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) + + RetryFailedMessage(opts *bind.TransactOpts, messageId [32]byte) (*types.Transaction, error) + SetCounterpart(opts *bind.TransactOpts, counterpartChainSelector uint64, counterpartAddress common.Address) (*types.Transaction, error) - SetCounterpartAddress(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) + SetCounterpartAddress(opts *bind.TransactOpts, counterpartAddress common.Address) (*types.Transaction, error) - SetCounterpartChainSelector(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) + SetCounterpartChainSelector(opts *bind.TransactOpts, counterpartChainSelector uint64) (*types.Transaction, error) SetPaused(opts *bind.TransactOpts, pause bool) (*types.Transaction, error) @@ -1031,6 +2383,62 @@ type PingPongDemoInterface interface { TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + UpdateApprovedSenders(opts *bind.TransactOpts, adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) + + WithdrawNativeToken(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) + + WithdrawTokens(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) + + Receive(opts *bind.TransactOpts) (*types.Transaction, error) + + FilterFeeTokenModified(opts *bind.FilterOpts, oldToken []common.Address, newToken []common.Address) (*PingPongDemoFeeTokenModifiedIterator, error) + + WatchFeeTokenModified(opts *bind.WatchOpts, sink chan<- *PingPongDemoFeeTokenModified, oldToken []common.Address, newToken []common.Address) (event.Subscription, error) + + ParseFeeTokenModified(log types.Log) (*PingPongDemoFeeTokenModified, error) + + FilterMessageAbandoned(opts *bind.FilterOpts, messageId [][32]byte) (*PingPongDemoMessageAbandonedIterator, error) + + WatchMessageAbandoned(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageAbandoned, messageId [][32]byte) (event.Subscription, error) + + ParseMessageAbandoned(log types.Log) (*PingPongDemoMessageAbandoned, error) + + FilterMessageAckReceived(opts *bind.FilterOpts) (*PingPongDemoMessageAckReceivedIterator, error) + + WatchMessageAckReceived(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageAckReceived) (event.Subscription, error) + + ParseMessageAckReceived(log types.Log) (*PingPongDemoMessageAckReceived, error) + + FilterMessageAckSent(opts *bind.FilterOpts) (*PingPongDemoMessageAckSentIterator, error) + + WatchMessageAckSent(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageAckSent) (event.Subscription, error) + + ParseMessageAckSent(log types.Log) (*PingPongDemoMessageAckSent, error) + + FilterMessageFailed(opts *bind.FilterOpts, messageId [][32]byte) (*PingPongDemoMessageFailedIterator, error) + + WatchMessageFailed(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageFailed, messageId [][32]byte) (event.Subscription, error) + + ParseMessageFailed(log types.Log) (*PingPongDemoMessageFailed, error) + + FilterMessageRecovered(opts *bind.FilterOpts, messageId [][32]byte) (*PingPongDemoMessageRecoveredIterator, error) + + WatchMessageRecovered(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageRecovered, messageId [][32]byte) (event.Subscription, error) + + ParseMessageRecovered(log types.Log) (*PingPongDemoMessageRecovered, error) + + FilterMessageSent(opts *bind.FilterOpts, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (*PingPongDemoMessageSentIterator, error) + + WatchMessageSent(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageSent, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (event.Subscription, error) + + ParseMessageSent(log types.Log) (*PingPongDemoMessageSent, error) + + FilterMessageSucceeded(opts *bind.FilterOpts, messageId [][32]byte) (*PingPongDemoMessageSucceededIterator, error) + + WatchMessageSucceeded(opts *bind.WatchOpts, sink chan<- *PingPongDemoMessageSucceeded, messageId [][32]byte) (event.Subscription, error) + + ParseMessageSucceeded(log types.Log) (*PingPongDemoMessageSucceeded, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PingPongDemoOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *PingPongDemoOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) diff --git a/core/gethwrappers/ccip/generated/self_funded_ping_pong/self_funded_ping_pong.go b/core/gethwrappers/ccip/generated/self_funded_ping_pong/self_funded_ping_pong.go index d6e2db6bf3..19865a5b71 100644 --- a/core/gethwrappers/ccip/generated/self_funded_ping_pong/self_funded_ping_pong.go +++ b/core/gethwrappers/ccip/generated/self_funded_ping_pong/self_funded_ping_pong.go @@ -30,6 +30,11 @@ var ( _ = abi.ConvertType ) +type CCIPClientBaseApprovedSenderUpdate struct { + DestChainSelector uint64 + Sender []byte +} + type ClientAny2EVMMessage struct { MessageId [32]byte SourceChainSelector uint64 @@ -44,8 +49,8 @@ type ClientEVMTokenAmount struct { } var SelfFundedPingPongMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"roundTripsBeforeFunding\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"InvalidRouter\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"countIncrBeforeFunding\",\"type\":\"uint8\"}],\"name\":\"CountIncrBeforeFundingSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Funded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pingPongCount\",\"type\":\"uint256\"}],\"name\":\"Ping\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pingPongCount\",\"type\":\"uint256\"}],\"name\":\"Pong\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"ccipReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pingPongCount\",\"type\":\"uint256\"}],\"name\":\"fundPingPong\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCountIncrBeforeFunding\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCounterpartAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCounterpartChainSelector\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"countIncrBeforeFunding\",\"type\":\"uint8\"}],\"name\":\"setCountIncrBeforeFunding\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"counterpartChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"counterpartAddress\",\"type\":\"address\"}],\"name\":\"setCounterpart\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setCounterpartAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"setCounterpartChainSelector\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pause\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startPingPong\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b506040516200182238038062001822833981016040819052620000349162000291565b828233806000846001600160a01b0381166200006b576040516335fdcccd60e21b8152600060048201526024015b60405180910390fd5b6001600160a01b039081166080528216620000c95760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f0000000000000000604482015260640162000062565b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000fc57620000fc81620001cd565b50506002805460ff60a01b1916905550600380546001600160a01b0319166001600160a01b0383811691821790925560405163095ea7b360e01b8152918416600483015260001960248301529063095ea7b3906044016020604051808303816000875af115801562000172573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001989190620002ea565b505050806002620001aa919062000315565b600360146101000a81548160ff021916908360ff16021790555050505062000347565b336001600160a01b03821603620002275760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000062565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6001600160a01b03811681146200028e57600080fd5b50565b600080600060608486031215620002a757600080fd5b8351620002b48162000278565b6020850151909350620002c78162000278565b604085015190925060ff81168114620002df57600080fd5b809150509250925092565b600060208284031215620002fd57600080fd5b815180151581146200030e57600080fd5b9392505050565b60ff81811683821602908116908181146200034057634e487b7160e01b600052601160045260246000fd5b5092915050565b6080516114aa62000378600039600081816102970152818161063f0152818161072c0152610c2201526114aa6000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c80638f491cba116100cd578063bee518a411610081578063e6c725f511610066578063e6c725f51461034d578063ef686d8e1461037d578063f2fde38b1461039057600080fd5b8063bee518a4146102f1578063ca709a251461032f57600080fd5b8063b0f479a1116100b2578063b0f479a114610295578063b187bd26146102bb578063b5a11011146102de57600080fd5b80638f491cba1461026f5780639d2aede51461028257600080fd5b80632874d8bf1161012457806379ba50971161010957806379ba50971461023657806385572ffb1461023e5780638da5cb5b1461025157600080fd5b80632874d8bf146101ef5780632b6e5d63146101f757600080fd5b806301ffc9a71461015657806316c38b3c1461017e578063181f5a77146101935780631892b906146101dc575b600080fd5b610169610164366004610e24565b6103a3565b60405190151581526020015b60405180910390f35b61019161018c366004610e6d565b61043c565b005b6101cf6040518060400160405280601881526020017f53656c6646756e64656450696e67506f6e6720312e322e30000000000000000081525081565b6040516101759190610ef3565b6101916101ea366004610f23565b61048e565b6101916104e9565b60025473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610175565b610191610525565b61019161024c366004610f3e565b610627565b60005473ffffffffffffffffffffffffffffffffffffffff16610211565b61019161027d366004610f79565b6106ac565b610191610290366004610fb4565b61088b565b7f0000000000000000000000000000000000000000000000000000000000000000610211565b60025474010000000000000000000000000000000000000000900460ff16610169565b6101916102ec366004610fd1565b6108da565b60015474010000000000000000000000000000000000000000900467ffffffffffffffff1660405167ffffffffffffffff9091168152602001610175565b60035473ffffffffffffffffffffffffffffffffffffffff16610211565b60035474010000000000000000000000000000000000000000900460ff1660405160ff9091168152602001610175565b61019161038b366004611008565b61097c565b61019161039e366004610fb4565b610a04565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f85572ffb00000000000000000000000000000000000000000000000000000000148061043657507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b610444610a15565b6002805491151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b610496610a15565b6001805467ffffffffffffffff90921674010000000000000000000000000000000000000000027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6104f1610a15565b600280547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690556105236001610a96565b565b60015473ffffffffffffffffffffffffffffffffffffffff1633146105ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610698576040517fd7f733340000000000000000000000000000000000000000000000000000000081523360048201526024016105a2565b6106a96106a482611230565b610cd9565b50565b60035474010000000000000000000000000000000000000000900460ff1615806106f2575060035474010000000000000000000000000000000000000000900460ff1681105b156106fa5750565b6003546001906107259074010000000000000000000000000000000000000000900460ff16836112dd565b116106a9577f00000000000000000000000000000000000000000000000000000000000000006001546040517fa8d87a3b0000000000000000000000000000000000000000000000000000000081527401000000000000000000000000000000000000000090910467ffffffffffffffff16600482015273ffffffffffffffffffffffffffffffffffffffff919091169063a8d87a3b90602401602060405180830381865afa1580156107dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108009190611318565b73ffffffffffffffffffffffffffffffffffffffff1663eff7cc486040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561084757600080fd5b505af115801561085b573d6000803e3d6000fd5b50506040517f302777af5d26fab9dd5120c5f1307c65193ebc51daf33244ada4365fab10602c925060009150a150565b610893610a15565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6108e2610a15565b6001805467ffffffffffffffff90931674010000000000000000000000000000000000000000027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909316929092179091556002805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffffff0000000000000000000000000000000000000000909216919091179055565b610984610a15565b600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000060ff8416908102919091179091556040519081527f4768dbf8645b24c54f2887651545d24f748c0d0d1d4c689eb810fb19f0befcf39060200160405180910390a150565b610a0c610a15565b6106a981610d2f565b60005473ffffffffffffffffffffffffffffffffffffffff163314610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016105a2565b80600116600103610ad9576040518181527f48257dc961b6f792c2b78a080dacfed693b660960a702de21cee364e20270e2f9060200160405180910390a1610b0d565b6040518181527f58b69f57828e6962d216502094c54f6562f3bf082ba758966c3454f9e37b15259060200160405180910390a15b610b16816106ac565b6040805160a0810190915260025473ffffffffffffffffffffffffffffffffffffffff1660c08201526000908060e08101604051602081830303815290604052815260200183604051602001610b6e91815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905281526020016000604051908082528060200260200182016040528015610be857816020015b6040805180820190915260008082526020820152815260200190600190039081610bc15790505b50815260035473ffffffffffffffffffffffffffffffffffffffff16602080830191909152604080519182018152600082529091015290507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166396f4e9f9600160149054906101000a900467ffffffffffffffff16836040518363ffffffff1660e01b8152600401610c91929190611335565b6020604051808303816000875af1158015610cb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd4919061144a565b505050565b60008160600151806020019051810190610cf3919061144a565b60025490915074010000000000000000000000000000000000000000900460ff16610d2b57610d2b610d26826001611463565b610a96565b5050565b3373ffffffffffffffffffffffffffffffffffffffff821603610dae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016105a2565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215610e3657600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610e6657600080fd5b9392505050565b600060208284031215610e7f57600080fd5b81358015158114610e6657600080fd5b6000815180845260005b81811015610eb557602081850181015186830182015201610e99565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610e666020830184610e8f565b803567ffffffffffffffff81168114610f1e57600080fd5b919050565b600060208284031215610f3557600080fd5b610e6682610f06565b600060208284031215610f5057600080fd5b813567ffffffffffffffff811115610f6757600080fd5b820160a08185031215610e6657600080fd5b600060208284031215610f8b57600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146106a957600080fd5b600060208284031215610fc657600080fd5b8135610e6681610f92565b60008060408385031215610fe457600080fd5b610fed83610f06565b91506020830135610ffd81610f92565b809150509250929050565b60006020828403121561101a57600080fd5b813560ff81168114610e6657600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561107d5761107d61102b565b60405290565b60405160a0810167ffffffffffffffff8111828210171561107d5761107d61102b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156110ed576110ed61102b565b604052919050565b600082601f83011261110657600080fd5b813567ffffffffffffffff8111156111205761112061102b565b61115160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016110a6565b81815284602083860101111561116657600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261119457600080fd5b8135602067ffffffffffffffff8211156111b0576111b061102b565b6111be818360051b016110a6565b82815260069290921b840181019181810190868411156111dd57600080fd5b8286015b8481101561122557604081890312156111fa5760008081fd5b61120261105a565b813561120d81610f92565b815281850135858201528352918301916040016111e1565b509695505050505050565b600060a0823603121561124257600080fd5b61124a611083565b8235815261125a60208401610f06565b6020820152604083013567ffffffffffffffff8082111561127a57600080fd5b611286368387016110f5565b6040840152606085013591508082111561129f57600080fd5b6112ab368387016110f5565b606084015260808501359150808211156112c457600080fd5b506112d136828601611183565b60808301525092915050565b600082611313577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b60006020828403121561132a57600080fd5b8151610e6681610f92565b6000604067ffffffffffffffff851683526020604081850152845160a0604086015261136460e0860182610e8f565b9050818601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08087840301606088015261139f8383610e8f565b6040890151888203830160808a01528051808352908601945060009350908501905b80841015611400578451805173ffffffffffffffffffffffffffffffffffffffff168352860151868301529385019360019390930192908601906113c1565b50606089015173ffffffffffffffffffffffffffffffffffffffff1660a08901526080890151888203830160c08a0152955061143c8187610e8f565b9a9950505050505050505050565b60006020828403121561145c57600080fd5b5051919050565b80820180821115610436577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"roundTripsBeforeFunding\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"CannotAcknowledgeUnsentMessage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAckMessageHeader\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"}],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"InvalidRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"name\":\"InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageAlreadyAcknowledged\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageNotFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySelf\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"countIncrBeforeFunding\",\"type\":\"uint8\"}],\"name\":\"CountIncrBeforeFundingSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newToken\",\"type\":\"address\"}],\"name\":\"FeeTokenModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Funded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenReceiver\",\"type\":\"address\"}],\"name\":\"MessageAbandoned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"MessageAckReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"incomingMessageId\",\"type\":\"bytes32\"}],\"name\":\"MessageAckSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageRecovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"incomingMessageId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ACKMessageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pingPongCount\",\"type\":\"uint256\"}],\"name\":\"Ping\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pingPongCount\",\"type\":\"uint256\"}],\"name\":\"Pong\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ACK_MESSAGE_HEADER\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"abandonFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"ccipReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ccipSend\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"disableChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_extraArgsBytes\",\"type\":\"bytes\"}],\"name\":\"enableChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pingPongCount\",\"type\":\"uint256\"}],\"name\":\"fundPingPong\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCountIncrBeforeFunding\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCounterpartAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCounterpartChainSelector\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"getMessageContents\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"getMessageStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"senderAddr\",\"type\":\"bytes\"}],\"name\":\"isApprovedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"modifyFeeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"processMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"retryFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"s_chainConfigs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraArgsBytes\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_feeToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"s_messageStatus\",\"outputs\":[{\"internalType\":\"enumCCIPReceiverWithACK.MessageStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"countIncrBeforeFunding\",\"type\":\"uint8\"}],\"name\":\"setCountIncrBeforeFunding\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"counterpartChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"counterpartAddress\",\"type\":\"address\"}],\"name\":\"setCounterpart\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"counterpartAddress\",\"type\":\"address\"}],\"name\":\"setCounterpartAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"counterpartChainSelector\",\"type\":\"uint64\"}],\"name\":\"setCounterpartChainSelector\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pause\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startPingPong\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPClientBase.ApprovedSenderUpdate[]\",\"name\":\"adds\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPClientBase.ApprovedSenderUpdate[]\",\"name\":\"removes\",\"type\":\"tuple[]\"}],\"name\":\"updateApprovedSenders\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawNativeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60a06040523480156200001157600080fd5b5060405162004c3b38038062004c3b833981016040819052620000349162000591565b82828181818181803380600081620000935760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c657620000c6816200016d565b5050506001600160a01b038116620000f1576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b03908116608052600780546001600160a01b03191691841691821790551590506200013557620001356001600160a01b0382168360001962000218565b5050505050508060026200014a919062000600565b6009601d6101000a81548160ff021916908360ff16021790555050505062000700565b336001600160a01b03821603620001c75760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016200008a565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156200026a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000290919062000626565b6200029c919062000640565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152919250620002f891869190620002fe16565b50505050565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908201526000906200034d906001600160a01b038516908490620003d4565b805190915015620003cf57808060200190518101906200036e91906200065c565b620003cf5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016200008a565b505050565b6060620003e58484600085620003ed565b949350505050565b606082471015620004505760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016200008a565b600080866001600160a01b031685876040516200046e9190620006ad565b60006040518083038185875af1925050503d8060008114620004ad576040519150601f19603f3d011682016040523d82523d6000602084013e620004b2565b606091505b509092509050620004c687838387620004d1565b979650505050505050565b60608315620005455782516000036200053d576001600160a01b0385163b6200053d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016200008a565b5081620003e5565b620003e583838151156200055c5781518083602001fd5b8060405162461bcd60e51b81526004016200008a9190620006cb565b6001600160a01b03811681146200058e57600080fd5b50565b600080600060608486031215620005a757600080fd5b8351620005b48162000578565b6020850151909350620005c78162000578565b604085015190925060ff81168114620005df57600080fd5b809150509250925092565b634e487b7160e01b600052601160045260246000fd5b60ff81811683821602908116908181146200061f576200061f620005ea565b5092915050565b6000602082840312156200063957600080fd5b5051919050565b80820180821115620006565762000656620005ea565b92915050565b6000602082840312156200066f57600080fd5b815180151581146200068057600080fd5b9392505050565b60005b83811015620006a45781810151838201526020016200068a565b50506000910152565b60008251620006c181846020870162000687565b9190910192915050565b6020815260008251806020840152620006ec81604085016020870162000687565b601f01601f19169190910160400192915050565b6080516144e762000754600039600081816105e601528181610827015281816108b701528181611441015281816117bf015281816122e5015281816123ae015281816124860152612b7801526144e76000f3fe60806040526004361061021d5760003560e01c80638462a2b91161011d578063bee518a4116100b0578063e6c725f51161007f578063ef686d8e11610064578063ef686d8e14610744578063f2fde38b14610764578063ff2deec31461078457600080fd5b8063e6c725f5146106eb578063e89b44851461073157600080fd5b8063bee518a414610662578063cf6730f81461068b578063d8469e40146106ab578063e4ca8754146106cb57600080fd5b80639d2aede5116100ec5780639d2aede5146105b7578063b0f479a1146105d7578063b187bd261461060a578063b5a110111461064257600080fd5b80638462a2b91461052c57806385572ffb1461054c5780638da5cb5b1461056c5780638f491cba1461059757600080fd5b806335f170ef116101b05780635e35359e1161017f5780636d62d633116101645780636d62d633146104ae5780636fef519e146104ce57806379ba50971461051757600080fd5b80635e35359e146104615780636939cd971461048157600080fd5b806335f170ef146103c457806341eade46146103f35780635075a9d414610413578063536c6bfa1461044157600080fd5b8063181f5a77116101ec578063181f5a77146102e15780631892b906146103375780632874d8bf146103575780632b6e5d631461036c57600080fd5b806305bfe982146102295780630e958d6b1461026f57806311e85dff1461029f57806316c38b3c146102c157600080fd5b3661022457005b600080fd5b34801561023557600080fd5b50610259610244366004613361565b60086020526000908152604090205460ff1681565b604051610266919061337a565b60405180910390f35b34801561027b57600080fd5b5061028f61028a36600461341a565b6107b1565b6040519015158152602001610266565b3480156102ab57600080fd5b506102bf6102ba366004613491565b6107fc565b005b3480156102cd57600080fd5b506102bf6102dc3660046134bc565b610974565b3480156102ed57600080fd5b5061032a6040518060400160405280601881526020017f53656c6646756e64656450696e67506f6e6720312e322e30000000000000000081525081565b6040516102669190613547565b34801561034357600080fd5b506102bf61035236600461355a565b6109ce565b34801561036357600080fd5b506102bf610a11565b34801561037857600080fd5b5060095468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610266565b3480156103d057600080fd5b506103e46103df36600461355a565b610a4d565b60405161026693929190613577565b3480156103ff57600080fd5b506102bf61040e36600461355a565b610b84565b34801561041f57600080fd5b5061043361042e366004613361565b610bcf565b604051908152602001610266565b34801561044d57600080fd5b506102bf61045c3660046135ae565b610be2565b34801561046d57600080fd5b506102bf61047c3660046135da565b610bf8565b34801561048d57600080fd5b506104a161049c366004613361565b610c26565b6040516102669190613678565b3480156104ba57600080fd5b506102bf6104c9366004613715565b610e31565b3480156104da57600080fd5b5061032a6040518060400160405280601581526020017f4d4553534147455f41434b4e4f574c45444745445f000000000000000000000081525081565b34801561052357600080fd5b506102bf61114b565b34801561053857600080fd5b506102bf61054736600461378a565b611248565b34801561055857600080fd5b506102bf6105673660046137f6565b611429565b34801561057857600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661039f565b3480156105a357600080fd5b506102bf6105b2366004613361565b611724565b3480156105c357600080fd5b506102bf6105d2366004613491565b611908565b3480156105e357600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061039f565b34801561061657600080fd5b506009547c0100000000000000000000000000000000000000000000000000000000900460ff1661028f565b34801561064e57600080fd5b506102bf61065d366004613831565b6119c2565b34801561066e57600080fd5b5060095460405167ffffffffffffffff9091168152602001610266565b34801561069757600080fd5b506102bf6106a63660046137f6565b611b35565b3480156106b757600080fd5b506102bf6106c636600461385f565b611d22565b3480156106d757600080fd5b506102bf6106e6366004613361565b611da1565b3480156106f757600080fd5b506009547d010000000000000000000000000000000000000000000000000000000000900460ff1660405160ff9091168152602001610266565b61043361073f366004613a17565b61200a565b34801561075057600080fd5b506102bf61075f366004613b24565b61258e565b34801561077057600080fd5b506102bf61077f366004613491565b61261f565b34801561079057600080fd5b5060075461039f9073ffffffffffffffffffffffffffffffffffffffff1681565b67ffffffffffffffff831660009081526002602052604080822090516003909101906107e09085908590613b47565b9081526040519081900360200190205460ff1690509392505050565b610804612630565b60075473ffffffffffffffffffffffffffffffffffffffff1615610867576108677f000000000000000000000000000000000000000000000000000000000000000060075473ffffffffffffffffffffffffffffffffffffffff169060006126b1565b6007805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355169015610916576109167f000000000000000000000000000000000000000000000000000000000000000060075473ffffffffffffffffffffffffffffffffffffffff16907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6128b1565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f4a1cb6b940121ea2ba30fb9b494035cbfe2d4b6b080db8b502150410bef7eb4e60405160405180910390a35050565b61097c612630565b600980549115157c0100000000000000000000000000000000000000000000000000000000027fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6109d6612630565b600980547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff92909216919091179055565b610a19612630565b600980547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff169055610a4b60016129b5565b565b6002602052600090815260409020805460018201805460ff9092169291610a7390613b57565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9f90613b57565b8015610aec5780601f10610ac157610100808354040283529160200191610aec565b820191906000526020600020905b815481529060010190602001808311610acf57829003601f168201915b505050505090806002018054610b0190613b57565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2d90613b57565b8015610b7a5780601f10610b4f57610100808354040283529160200191610b7a565b820191906000526020600020905b815481529060010190602001808311610b5d57829003601f168201915b5050505050905083565b610b8c612630565b67ffffffffffffffff16600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6000610bdc600483612bfd565b92915050565b610bea612630565b610bf48282612c10565b5050565b610c00612630565b610c2173ffffffffffffffffffffffffffffffffffffffff84168383612d6a565b505050565b6040805160a08082018352600080835260208084018290526060848601819052808501819052608085015285825260038152908490208451928301855280548352600181015467ffffffffffffffff1691830191909152600281018054939492939192840191610c9590613b57565b80601f0160208091040260200160405190810160405280929190818152602001828054610cc190613b57565b8015610d0e5780601f10610ce357610100808354040283529160200191610d0e565b820191906000526020600020905b815481529060010190602001808311610cf157829003601f168201915b50505050508152602001600382018054610d2790613b57565b80601f0160208091040260200160405190810160405280929190818152602001828054610d5390613b57565b8015610da05780601f10610d7557610100808354040283529160200191610da0565b820191906000526020600020905b815481529060010190602001808311610d8357829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015610e235760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101610dce565b505050915250909392505050565b610e39612630565b6001610e46600484612bfd565b14610e85576040517fb6e78260000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b610e958260025b60049190612dc0565b506000828152600360209081526040808320815160a08101835281548152600182015467ffffffffffffffff16938101939093526002810180549192840191610edd90613b57565b80601f0160208091040260200160405190810160405280929190818152602001828054610f0990613b57565b8015610f565780601f10610f2b57610100808354040283529160200191610f56565b820191906000526020600020905b815481529060010190602001808311610f3957829003601f168201915b50505050508152602001600382018054610f6f90613b57565b80601f0160208091040260200160405190810160405280929190818152602001828054610f9b90613b57565b8015610fe85780601f10610fbd57610100808354040283529160200191610fe8565b820191906000526020600020905b815481529060010190602001808311610fcb57829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b8282101561106b5760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101611016565b5050505081525050905060005b8160800151518110156110fa576110f2838360800151838151811061109f5761109f613baa565b602002602001015160200151846080015184815181106110c1576110c1613baa565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16612d6a9092919063ffffffff16565b600101611078565b5060405173ffffffffffffffffffffffffffffffffffffffff8316815283907fd5038100bd3dc9631d3c3f4f61a3e53e9d466f40c47af9897292c7b35e32a9579060200160405180910390a2505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146111cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610e7c565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b611250612630565b60005b81811015611333576002600084848481811061127157611271613baa565b90506020028101906112839190613bd9565b61129190602081019061355a565b67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206003018383838181106112c8576112c8613baa565b90506020028101906112da9190613bd9565b6112e8906020810190613c17565b6040516112f6929190613b47565b90815260405190819003602001902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600101611253565b5060005b838110156114225760016002600087878581811061135757611357613baa565b90506020028101906113699190613bd9565b61137790602081019061355a565b67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206003018686848181106113ae576113ae613baa565b90506020028101906113c09190613bd9565b6113ce906020810190613c17565b6040516113dc929190613b47565b90815260405190819003602001902080549115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909216919091179055600101611337565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461149a576040517fd7f73334000000000000000000000000000000000000000000000000000000008152336004820152602401610e7c565b6114aa604082016020830161355a565b6114b76040830183613c17565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525067ffffffffffffffff8616815260026020526040908190209051600390910193506115159250849150613c7c565b9081526040519081900360200190205460ff1661156057806040517f5075bb38000000000000000000000000000000000000000000000000000000008152600401610e7c9190613547565b611570604084016020850161355a565b67ffffffffffffffff8116600090815260026020526040902060018101805461159890613b57565b159050806115a75750805460ff165b156115ea576040517fd79f2ea400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff83166004820152602401610e7c565b6040517fcf6730f8000000000000000000000000000000000000000000000000000000008152309063cf6730f890611626908890600401613d90565b600060405180830381600087803b15801561164057600080fd5b505af1925050508015611651575060015b6116f1573d80801561167f576040519150601f19603f3d011682016040523d82523d6000602084013e611684565b606091505b5061169186356001610e8c565b508535600090815260036020526040902086906116ae8282614162565b50506040518635907f55bc02a9ef6f146737edeeb425738006f67f077e7138de3bf84a15bde1a5b56f906116e3908490613547565b60405180910390a250611422565b6040518535907fdf6958669026659bac75ba986685e11a7d271284989f565f2802522663e9a70f90600090a25050505050565b6009547d010000000000000000000000000000000000000000000000000000000000900460ff16158061177c57506009547d010000000000000000000000000000000000000000000000000000000000900460ff1681105b156117845750565b6009546001906117b8907d010000000000000000000000000000000000000000000000000000000000900460ff168361425c565b11611905577f00000000000000000000000000000000000000000000000000000000000000006009546040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff909116600482015273ffffffffffffffffffffffffffffffffffffffff919091169063a8d87a3b90602401602060405180830381865afa158015611858573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187c9190614297565b73ffffffffffffffffffffffffffffffffffffffff1663eff7cc486040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156118c357600080fd5b505af11580156118d7573d6000803e3d6000fd5b50506040517f302777af5d26fab9dd5120c5f1307c65193ebc51daf33244ada4365fab10602c925060009150a15b50565b611910612630565b600980547fffffffff0000000000000000000000000000000000000000ffffffffffffffff166801000000000000000073ffffffffffffffffffffffffffffffffffffffff84169081029190911790915560408051602081019290925201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815260095467ffffffffffffffff16600090815260026020522060010190610bf490826142b4565b6119ca612630565b6009805467ffffffffffffffff84167fffffffff0000000000000000000000000000000000000000000000000000000090911681176801000000000000000073ffffffffffffffffffffffffffffffffffffffff8516908102919091179092556000908152600260209081526040918290208251918201939093526001926003019101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611a8591613c7c565b908152604080516020928190038301812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169415159490941790935573ffffffffffffffffffffffffffffffffffffffff84169183019190915201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815267ffffffffffffffff8416600090815260026020522060010190610c2190826142b4565b333014611b6e576040517f14d4a4e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b7e604082016020830161355a565b611b8b6040830183613c17565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525067ffffffffffffffff861681526002602052604090819020905160039091019350611be99250849150613c7c565b9081526040519081900360200190205460ff16611c3457806040517f5075bb38000000000000000000000000000000000000000000000000000000008152600401610e7c9190613547565b611c44604084016020850161355a565b67ffffffffffffffff81166000908152600260205260409020600181018054611c6c90613b57565b15905080611c7b5750805460ff165b15611cbe576040517fd79f2ea400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff83166004820152602401610e7c565b6000611ccd6060870187613c17565b810190611cda9190613361565b6009549091507c0100000000000000000000000000000000000000000000000000000000900460ff16611d1a57611d1a611d158260016143ce565b6129b5565b505050505050565b611d2a612630565b67ffffffffffffffff8516600090815260026020526040902060018101611d52858783613ee6565b508115611d6a5760028101611d68838583613ee6565b505b805460ff1615611d1a5780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555050505050565b611da9612630565b6001611db6600483612bfd565b14611df0576040517fb6e7826000000000000000000000000000000000000000000000000000000000815260048101829052602401610e7c565b611dfb816000610e8c565b506000818152600360209081526040808320815160a08101835281548152600182015467ffffffffffffffff16938101939093526002810180549192840191611e4390613b57565b80601f0160208091040260200160405190810160405280929190818152602001828054611e6f90613b57565b8015611ebc5780601f10611e9157610100808354040283529160200191611ebc565b820191906000526020600020905b815481529060010190602001808311611e9f57829003601f168201915b50505050508152602001600382018054611ed590613b57565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0190613b57565b8015611f4e5780601f10611f2357610100808354040283529160200191611f4e565b820191906000526020600020905b815481529060010190602001808311611f3157829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015611fd15760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101611f7c565b5050505081525050905060405182907fef3bf8c64bc480286c4f3503b870ceb23e648d2d902e31fb7bb46680da6de8ad90600090a25050565b67ffffffffffffffff831660009081526002602052604081206001810180548692919061203690613b57565b159050806120455750805460ff165b15612088576040517fd79f2ea400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff83166004820152602401610e7c565b6040805160a08101825267ffffffffffffffff88166000908152600260205291822060010180548291906120bb90613b57565b80601f01602080910402602001604051908101604052809291908181526020018280546120e790613b57565b80156121345780601f1061210957610100808354040283529160200191612134565b820191906000526020600020905b81548152906001019060200180831161211757829003601f168201915b5050509183525050602080820188905260408083018a905260075473ffffffffffffffffffffffffffffffffffffffff16606084015267ffffffffffffffff8b1660009081526002928390522001805460809092019161219390613b57565b80601f01602080910402602001604051908101604052809291908181526020018280546121bf90613b57565b801561220c5780601f106121e15761010080835404028352916020019161220c565b820191906000526020600020905b8154815290600101906020018083116121ef57829003601f168201915b5050505050815250905060005b865181101561236d57612289333089848151811061223957612239613baa565b6020026020010151602001518a858151811061225757612257613baa565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16612dd5909392919063ffffffff16565b600754875173ffffffffffffffffffffffffffffffffffffffff909116908890839081106122b9576122b9613baa565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1614612365576123657f000000000000000000000000000000000000000000000000000000000000000088838151811061231657612316613baa565b60200260200101516020015189848151811061233457612334613baa565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff166128b19092919063ffffffff16565b600101612219565b506040517f20487ded00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906320487ded906123e5908b9086906004016143e1565b602060405180830381865afa158015612402573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061242691906144a4565b60075490915073ffffffffffffffffffffffffffffffffffffffff161561246c5760075461246c9073ffffffffffffffffffffffffffffffffffffffff16333084612dd5565b60075473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116916396f4e9f99116156124bb5760006124bd565b825b8a856040518463ffffffff1660e01b81526004016124dc9291906143e1565b60206040518083038185885af11580156124fa573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061251f91906144a4565b60008181526008602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055519196509086907f9102b9031c3c59d8320bf14d84d7d7a3434366b91032fad1c87579cfc62b2372908390a3505050509392505050565b612596612630565b600980547fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167d01000000000000000000000000000000000000000000000000000000000060ff8416908102919091179091556040519081527f4768dbf8645b24c54f2887651545d24f748c0d0d1d4c689eb810fb19f0befcf39060200160405180910390a150565b612627612630565b61190581612e33565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610e7c565b80158061275157506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa15801561272b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061274f91906144a4565b155b6127dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610e7c565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610c219084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612f28565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015612928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061294c91906144a4565b61295691906143ce565b60405173ffffffffffffffffffffffffffffffffffffffff85166024820152604481018290529091506129af9085907f095ea7b3000000000000000000000000000000000000000000000000000000009060640161282f565b50505050565b806001166001036129f8576040518181527f48257dc961b6f792c2b78a080dacfed693b660960a702de21cee364e20270e2f9060200160405180910390a1612a2c565b6040518181527f58b69f57828e6962d216502094c54f6562f3bf082ba758966c3454f9e37b15259060200160405180910390a15b612a3581611724565b6040805160a0810190915260095468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1660c08201526000908060e08101604051602081830303815290604052815260200183604051602001612a9991815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905281526020016000604051908082528060200260200182016040528015612b1357816020015b6040805180820190915260008082526020820152815260200190600190039081612aec5790505b50815260075473ffffffffffffffffffffffffffffffffffffffff908116602080840191909152604080519182018152600082529283015260095491517f96f4e9f90000000000000000000000000000000000000000000000000000000081529293507f000000000000000000000000000000000000000000000000000000000000000016916396f4e9f991612bba9167ffffffffffffffff9091169085906004016143e1565b6020604051808303816000875af1158015612bd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2191906144a4565b6000612c098383613034565b9392505050565b80471015612c7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610e7c565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612cd4576040519150601f19603f3d011682016040523d82523d6000602084013e612cd9565b606091505b5050905080610c21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610e7c565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610c219084907fa9059cbb000000000000000000000000000000000000000000000000000000009060640161282f565b6000612dcd8484846130be565b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526129af9085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161282f565b3373ffffffffffffffffffffffffffffffffffffffff821603612eb2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610e7c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000612f8a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166130db9092919063ffffffff16565b805190915015610c215780806020019051810190612fa891906144bd565b610c21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610e7c565b600081815260028301602052604081205480151580613058575061305884846130ea565b612c09576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f456e756d657261626c654d61703a206e6f6e6578697374656e74206b657900006044820152606401610e7c565b60008281526002840160205260408120829055612dcd84846130f6565b6060612dcd8484600085613102565b6000612c09838361321b565b6000612c098383613233565b606082471015613194576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610e7c565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516131bd9190613c7c565b60006040518083038185875af1925050503d80600081146131fa576040519150601f19603f3d011682016040523d82523d6000602084013e6131ff565b606091505b509150915061321087838387613282565b979650505050505050565b60008181526001830160205260408120541515612c09565b600081815260018301602052604081205461327a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bdc565b506000610bdc565b606083156133185782516000036133115773ffffffffffffffffffffffffffffffffffffffff85163b613311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610e7c565b5081612dcd565b612dcd838381511561332d5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7c9190613547565b60006020828403121561337357600080fd5b5035919050565b60208101600383106133b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b67ffffffffffffffff8116811461190557600080fd5b60008083601f8401126133e357600080fd5b50813567ffffffffffffffff8111156133fb57600080fd5b60208301915083602082850101111561341357600080fd5b9250929050565b60008060006040848603121561342f57600080fd5b833561343a816133bb565b9250602084013567ffffffffffffffff81111561345657600080fd5b613462868287016133d1565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461190557600080fd5b6000602082840312156134a357600080fd5b8135612c098161346f565b801515811461190557600080fd5b6000602082840312156134ce57600080fd5b8135612c09816134ae565b60005b838110156134f45781810151838201526020016134dc565b50506000910152565b600081518084526135158160208601602086016134d9565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612c0960208301846134fd565b60006020828403121561356c57600080fd5b8135612c09816133bb565b831515815260606020820152600061359260608301856134fd565b82810360408401526135a481856134fd565b9695505050505050565b600080604083850312156135c157600080fd5b82356135cc8161346f565b946020939093013593505050565b6000806000606084860312156135ef57600080fd5b83356135fa8161346f565b9250602084013561360a8161346f565b929592945050506040919091013590565b60008151808452602080850194506020840160005b8381101561366d578151805173ffffffffffffffffffffffffffffffffffffffff1688528301518388015260409096019590820190600101613630565b509495945050505050565b602081528151602082015267ffffffffffffffff60208301511660408201526000604083015160a060608401526136b260c08401826134fd565b905060608401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160808601526136ee83836134fd565b925060808601519150808584030160a08601525061370c828261361b565b95945050505050565b6000806040838503121561372857600080fd5b82359150602083013561373a8161346f565b809150509250929050565b60008083601f84011261375757600080fd5b50813567ffffffffffffffff81111561376f57600080fd5b6020830191508360208260051b850101111561341357600080fd5b600080600080604085870312156137a057600080fd5b843567ffffffffffffffff808211156137b857600080fd5b6137c488838901613745565b909650945060208701359150808211156137dd57600080fd5b506137ea87828801613745565b95989497509550505050565b60006020828403121561380857600080fd5b813567ffffffffffffffff81111561381f57600080fd5b820160a08185031215612c0957600080fd5b6000806040838503121561384457600080fd5b823561384f816133bb565b9150602083013561373a8161346f565b60008060008060006060868803121561387757600080fd5b8535613882816133bb565b9450602086013567ffffffffffffffff8082111561389f57600080fd5b6138ab89838a016133d1565b909650945060408801359150808211156138c457600080fd5b506138d1888289016133d1565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715613934576139346138e2565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613981576139816138e2565b604052919050565b600082601f83011261399a57600080fd5b813567ffffffffffffffff8111156139b4576139b46138e2565b6139e560207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161393a565b8181528460208386010111156139fa57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600060608486031215613a2c57600080fd5b8335613a37816133bb565b925060208481013567ffffffffffffffff80821115613a5557600080fd5b818701915087601f830112613a6957600080fd5b813581811115613a7b57613a7b6138e2565b613a89848260051b0161393a565b81815260069190911b8301840190848101908a831115613aa857600080fd5b938501935b82851015613af4576040858c031215613ac65760008081fd5b613ace613911565b8535613ad98161346f565b81528587013587820152825260409094019390850190613aad565b965050506040870135925080831115613b0c57600080fd5b5050613b1a86828701613989565b9150509250925092565b600060208284031215613b3657600080fd5b813560ff81168114612c0957600080fd5b8183823760009101908152919050565b600181811c90821680613b6b57607f821691505b602082108103613ba4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112613c0d57600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613c4c57600080fd5b83018035915067ffffffffffffffff821115613c6757600080fd5b60200191503681900382131561341357600080fd5b60008251613c0d8184602087016134d9565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613cc357600080fd5b830160208101925035905067ffffffffffffffff811115613ce357600080fd5b80360382131561341357600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8183526000602080850194508260005b8581101561366d578135613d5e8161346f565b73ffffffffffffffffffffffffffffffffffffffff168752818301358388015260409687019690910190600101613d4b565b602081528135602082015260006020830135613dab816133bb565b67ffffffffffffffff8082166040850152613dc96040860186613c8e565b925060a06060860152613de060c086018483613cf2565b925050613df06060860186613c8e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080878603016080880152613e26858385613cf2565b9450608088013592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1883603018312613e5f57600080fd5b60209288019283019235915083821115613e7857600080fd5b8160061b3603831315613e8a57600080fd5b8685030160a0870152613210848284613d3b565b601f821115610c21576000816000526020600020601f850160051c81016020861015613ec75750805b601f850160051c820191505b81811015611d1a57828155600101613ed3565b67ffffffffffffffff831115613efe57613efe6138e2565b613f1283613f0c8354613b57565b83613e9e565b6000601f841160018114613f645760008515613f2e5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611422565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015613fb35786850135825560209485019460019092019101613f93565b5086821015613fee577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b813561403a8161346f565b73ffffffffffffffffffffffffffffffffffffffff81167fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825550602082013560018201555050565b680100000000000000008311156140a0576140a06138e2565b80548382558084101561412d5760017f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80831683146140e1576140e1614000565b80861686146140f2576140f2614000565b5060008360005260206000208360011b81018760011b820191505b8082101561412857828255828483015560028201915061410d565b505050505b5060008181526020812083915b85811015611d1a5761414c838361402f565b604092909201916002919091019060010161413a565b81358155600181016020830135614178816133bb565b67ffffffffffffffff8082167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008454161783556141b86040860186613c17565b935091506141ca838360028701613ee6565b6141d76060860186613c17565b935091506141e9838360038701613ee6565b608085013592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe185360301831261422057600080fd5b91840191823591508082111561423557600080fd5b506020820191508060061b360382131561424e57600080fd5b6129af818360048601614087565b600082614292577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b6000602082840312156142a957600080fd5b8151612c098161346f565b815167ffffffffffffffff8111156142ce576142ce6138e2565b6142e2816142dc8454613b57565b84613e9e565b602080601f83116001811461433557600084156142ff5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611d1a565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561438257888601518255948401946001909101908401614363565b50858210156143be57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115610bdc57610bdc614000565b67ffffffffffffffff83168152604060208201526000825160a0604084015261440d60e08401826134fd565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08085840301606086015261444983836134fd565b92506040860151915080858403016080860152614466838361361b565b925073ffffffffffffffffffffffffffffffffffffffff60608701511660a086015260808601519150808584030160c0860152506135a482826134fd565b6000602082840312156144b657600080fd5b5051919050565b6000602082840312156144cf57600080fd5b8151612c09816134ae56fea164736f6c6343000818000a", } var SelfFundedPingPongABI = SelfFundedPingPongMetaData.ABI @@ -184,6 +189,28 @@ func (_SelfFundedPingPong *SelfFundedPingPongTransactorRaw) Transact(opts *bind. return _SelfFundedPingPong.Contract.contract.Transact(opts, method, params...) } +func (_SelfFundedPingPong *SelfFundedPingPongCaller) ACKMESSAGEHEADER(opts *bind.CallOpts) ([]byte, error) { + var out []interface{} + err := _SelfFundedPingPong.contract.Call(opts, &out, "ACK_MESSAGE_HEADER") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) ACKMESSAGEHEADER() ([]byte, error) { + return _SelfFundedPingPong.Contract.ACKMESSAGEHEADER(&_SelfFundedPingPong.CallOpts) +} + +func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) ACKMESSAGEHEADER() ([]byte, error) { + return _SelfFundedPingPong.Contract.ACKMESSAGEHEADER(&_SelfFundedPingPong.CallOpts) +} + func (_SelfFundedPingPong *SelfFundedPingPongCaller) GetCountIncrBeforeFunding(opts *bind.CallOpts) (uint8, error) { var out []interface{} err := _SelfFundedPingPong.contract.Call(opts, &out, "getCountIncrBeforeFunding") @@ -250,26 +277,48 @@ func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) GetCounterpartChainS return _SelfFundedPingPong.Contract.GetCounterpartChainSelector(&_SelfFundedPingPong.CallOpts) } -func (_SelfFundedPingPong *SelfFundedPingPongCaller) GetFeeToken(opts *bind.CallOpts) (common.Address, error) { +func (_SelfFundedPingPong *SelfFundedPingPongCaller) GetMessageContents(opts *bind.CallOpts, messageId [32]byte) (ClientAny2EVMMessage, error) { var out []interface{} - err := _SelfFundedPingPong.contract.Call(opts, &out, "getFeeToken") + err := _SelfFundedPingPong.contract.Call(opts, &out, "getMessageContents", messageId) if err != nil { - return *new(common.Address), err + return *new(ClientAny2EVMMessage), err } - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out0 := *abi.ConvertType(out[0], new(ClientAny2EVMMessage)).(*ClientAny2EVMMessage) + + return out0, err + +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) GetMessageContents(messageId [32]byte) (ClientAny2EVMMessage, error) { + return _SelfFundedPingPong.Contract.GetMessageContents(&_SelfFundedPingPong.CallOpts, messageId) +} + +func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) GetMessageContents(messageId [32]byte) (ClientAny2EVMMessage, error) { + return _SelfFundedPingPong.Contract.GetMessageContents(&_SelfFundedPingPong.CallOpts, messageId) +} + +func (_SelfFundedPingPong *SelfFundedPingPongCaller) GetMessageStatus(opts *bind.CallOpts, messageId [32]byte) (*big.Int, error) { + var out []interface{} + err := _SelfFundedPingPong.contract.Call(opts, &out, "getMessageStatus", messageId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -func (_SelfFundedPingPong *SelfFundedPingPongSession) GetFeeToken() (common.Address, error) { - return _SelfFundedPingPong.Contract.GetFeeToken(&_SelfFundedPingPong.CallOpts) +func (_SelfFundedPingPong *SelfFundedPingPongSession) GetMessageStatus(messageId [32]byte) (*big.Int, error) { + return _SelfFundedPingPong.Contract.GetMessageStatus(&_SelfFundedPingPong.CallOpts, messageId) } -func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) GetFeeToken() (common.Address, error) { - return _SelfFundedPingPong.Contract.GetFeeToken(&_SelfFundedPingPong.CallOpts) +func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) GetMessageStatus(messageId [32]byte) (*big.Int, error) { + return _SelfFundedPingPong.Contract.GetMessageStatus(&_SelfFundedPingPong.CallOpts, messageId) } func (_SelfFundedPingPong *SelfFundedPingPongCaller) GetRouter(opts *bind.CallOpts) (common.Address, error) { @@ -294,6 +343,28 @@ func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) GetRouter() (common. return _SelfFundedPingPong.Contract.GetRouter(&_SelfFundedPingPong.CallOpts) } +func (_SelfFundedPingPong *SelfFundedPingPongCaller) IsApprovedSender(opts *bind.CallOpts, sourceChainSelector uint64, senderAddr []byte) (bool, error) { + var out []interface{} + err := _SelfFundedPingPong.contract.Call(opts, &out, "isApprovedSender", sourceChainSelector, senderAddr) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) IsApprovedSender(sourceChainSelector uint64, senderAddr []byte) (bool, error) { + return _SelfFundedPingPong.Contract.IsApprovedSender(&_SelfFundedPingPong.CallOpts, sourceChainSelector, senderAddr) +} + +func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) IsApprovedSender(sourceChainSelector uint64, senderAddr []byte) (bool, error) { + return _SelfFundedPingPong.Contract.IsApprovedSender(&_SelfFundedPingPong.CallOpts, sourceChainSelector, senderAddr) +} + func (_SelfFundedPingPong *SelfFundedPingPongCaller) IsPaused(opts *bind.CallOpts) (bool, error) { var out []interface{} err := _SelfFundedPingPong.contract.Call(opts, &out, "isPaused") @@ -338,26 +409,79 @@ func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) Owner() (common.Addr return _SelfFundedPingPong.Contract.Owner(&_SelfFundedPingPong.CallOpts) } -func (_SelfFundedPingPong *SelfFundedPingPongCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { +func (_SelfFundedPingPong *SelfFundedPingPongCaller) SChainConfigs(opts *bind.CallOpts, arg0 uint64) (SChainConfigs, + + error) { var out []interface{} - err := _SelfFundedPingPong.contract.Call(opts, &out, "supportsInterface", interfaceId) + err := _SelfFundedPingPong.contract.Call(opts, &out, "s_chainConfigs", arg0) + outstruct := new(SChainConfigs) if err != nil { - return *new(bool), err + return *outstruct, err } - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.Disabled = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.Recipient = *abi.ConvertType(out[1], new([]byte)).(*[]byte) + outstruct.ExtraArgsBytes = *abi.ConvertType(out[2], new([]byte)).(*[]byte) + + return *outstruct, err + +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) SChainConfigs(arg0 uint64) (SChainConfigs, + + error) { + return _SelfFundedPingPong.Contract.SChainConfigs(&_SelfFundedPingPong.CallOpts, arg0) +} + +func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) SChainConfigs(arg0 uint64) (SChainConfigs, + + error) { + return _SelfFundedPingPong.Contract.SChainConfigs(&_SelfFundedPingPong.CallOpts, arg0) +} + +func (_SelfFundedPingPong *SelfFundedPingPongCaller) SFeeToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SelfFundedPingPong.contract.Call(opts, &out, "s_feeToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) SFeeToken() (common.Address, error) { + return _SelfFundedPingPong.Contract.SFeeToken(&_SelfFundedPingPong.CallOpts) +} + +func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) SFeeToken() (common.Address, error) { + return _SelfFundedPingPong.Contract.SFeeToken(&_SelfFundedPingPong.CallOpts) +} + +func (_SelfFundedPingPong *SelfFundedPingPongCaller) SMessageStatus(opts *bind.CallOpts, messageId [32]byte) (uint8, error) { + var out []interface{} + err := _SelfFundedPingPong.contract.Call(opts, &out, "s_messageStatus", messageId) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) return out0, err } -func (_SelfFundedPingPong *SelfFundedPingPongSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _SelfFundedPingPong.Contract.SupportsInterface(&_SelfFundedPingPong.CallOpts, interfaceId) +func (_SelfFundedPingPong *SelfFundedPingPongSession) SMessageStatus(messageId [32]byte) (uint8, error) { + return _SelfFundedPingPong.Contract.SMessageStatus(&_SelfFundedPingPong.CallOpts, messageId) } -func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _SelfFundedPingPong.Contract.SupportsInterface(&_SelfFundedPingPong.CallOpts, interfaceId) +func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) SMessageStatus(messageId [32]byte) (uint8, error) { + return _SelfFundedPingPong.Contract.SMessageStatus(&_SelfFundedPingPong.CallOpts, messageId) } func (_SelfFundedPingPong *SelfFundedPingPongCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { @@ -382,6 +506,18 @@ func (_SelfFundedPingPong *SelfFundedPingPongCallerSession) TypeAndVersion() (st return _SelfFundedPingPong.Contract.TypeAndVersion(&_SelfFundedPingPong.CallOpts) } +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) AbandonFailedMessage(opts *bind.TransactOpts, messageId [32]byte, receiver common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "abandonFailedMessage", messageId, receiver) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) AbandonFailedMessage(messageId [32]byte, receiver common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.AbandonFailedMessage(&_SelfFundedPingPong.TransactOpts, messageId, receiver) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) AbandonFailedMessage(messageId [32]byte, receiver common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.AbandonFailedMessage(&_SelfFundedPingPong.TransactOpts, messageId, receiver) +} + func (_SelfFundedPingPong *SelfFundedPingPongTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { return _SelfFundedPingPong.contract.Transact(opts, "acceptOwnership") } @@ -406,104 +542,1210 @@ func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) CcipReceive(mess return _SelfFundedPingPong.Contract.CcipReceive(&_SelfFundedPingPong.TransactOpts, message) } -func (_SelfFundedPingPong *SelfFundedPingPongTransactor) FundPingPong(opts *bind.TransactOpts, pingPongCount *big.Int) (*types.Transaction, error) { - return _SelfFundedPingPong.contract.Transact(opts, "fundPingPong", pingPongCount) -} +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) CcipSend(opts *bind.TransactOpts, destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "ccipSend", destChainSelector, tokenAmounts, data) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) CcipSend(destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.CcipSend(&_SelfFundedPingPong.TransactOpts, destChainSelector, tokenAmounts, data) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) CcipSend(destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.CcipSend(&_SelfFundedPingPong.TransactOpts, destChainSelector, tokenAmounts, data) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) DisableChain(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "disableChain", chainSelector) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) DisableChain(chainSelector uint64) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.DisableChain(&_SelfFundedPingPong.TransactOpts, chainSelector) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) DisableChain(chainSelector uint64) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.DisableChain(&_SelfFundedPingPong.TransactOpts, chainSelector) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) EnableChain(opts *bind.TransactOpts, chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "enableChain", chainSelector, recipient, _extraArgsBytes) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) EnableChain(chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.EnableChain(&_SelfFundedPingPong.TransactOpts, chainSelector, recipient, _extraArgsBytes) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) EnableChain(chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.EnableChain(&_SelfFundedPingPong.TransactOpts, chainSelector, recipient, _extraArgsBytes) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) FundPingPong(opts *bind.TransactOpts, pingPongCount *big.Int) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "fundPingPong", pingPongCount) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) FundPingPong(pingPongCount *big.Int) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.FundPingPong(&_SelfFundedPingPong.TransactOpts, pingPongCount) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) FundPingPong(pingPongCount *big.Int) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.FundPingPong(&_SelfFundedPingPong.TransactOpts, pingPongCount) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) ModifyFeeToken(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "modifyFeeToken", token) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) ModifyFeeToken(token common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.ModifyFeeToken(&_SelfFundedPingPong.TransactOpts, token) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) ModifyFeeToken(token common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.ModifyFeeToken(&_SelfFundedPingPong.TransactOpts, token) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) ProcessMessage(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "processMessage", message) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) ProcessMessage(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.ProcessMessage(&_SelfFundedPingPong.TransactOpts, message) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) ProcessMessage(message ClientAny2EVMMessage) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.ProcessMessage(&_SelfFundedPingPong.TransactOpts, message) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) RetryFailedMessage(opts *bind.TransactOpts, messageId [32]byte) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "retryFailedMessage", messageId) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) RetryFailedMessage(messageId [32]byte) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.RetryFailedMessage(&_SelfFundedPingPong.TransactOpts, messageId) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) RetryFailedMessage(messageId [32]byte) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.RetryFailedMessage(&_SelfFundedPingPong.TransactOpts, messageId) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) SetCountIncrBeforeFunding(opts *bind.TransactOpts, countIncrBeforeFunding uint8) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "setCountIncrBeforeFunding", countIncrBeforeFunding) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) SetCountIncrBeforeFunding(countIncrBeforeFunding uint8) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.SetCountIncrBeforeFunding(&_SelfFundedPingPong.TransactOpts, countIncrBeforeFunding) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) SetCountIncrBeforeFunding(countIncrBeforeFunding uint8) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.SetCountIncrBeforeFunding(&_SelfFundedPingPong.TransactOpts, countIncrBeforeFunding) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) SetCounterpart(opts *bind.TransactOpts, counterpartChainSelector uint64, counterpartAddress common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "setCounterpart", counterpartChainSelector, counterpartAddress) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) SetCounterpart(counterpartChainSelector uint64, counterpartAddress common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.SetCounterpart(&_SelfFundedPingPong.TransactOpts, counterpartChainSelector, counterpartAddress) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) SetCounterpart(counterpartChainSelector uint64, counterpartAddress common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.SetCounterpart(&_SelfFundedPingPong.TransactOpts, counterpartChainSelector, counterpartAddress) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) SetCounterpartAddress(opts *bind.TransactOpts, counterpartAddress common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "setCounterpartAddress", counterpartAddress) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) SetCounterpartAddress(counterpartAddress common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.SetCounterpartAddress(&_SelfFundedPingPong.TransactOpts, counterpartAddress) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) SetCounterpartAddress(counterpartAddress common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.SetCounterpartAddress(&_SelfFundedPingPong.TransactOpts, counterpartAddress) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) SetCounterpartChainSelector(opts *bind.TransactOpts, counterpartChainSelector uint64) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "setCounterpartChainSelector", counterpartChainSelector) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) SetCounterpartChainSelector(counterpartChainSelector uint64) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.SetCounterpartChainSelector(&_SelfFundedPingPong.TransactOpts, counterpartChainSelector) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) SetCounterpartChainSelector(counterpartChainSelector uint64) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.SetCounterpartChainSelector(&_SelfFundedPingPong.TransactOpts, counterpartChainSelector) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) SetPaused(opts *bind.TransactOpts, pause bool) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "setPaused", pause) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) SetPaused(pause bool) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.SetPaused(&_SelfFundedPingPong.TransactOpts, pause) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) SetPaused(pause bool) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.SetPaused(&_SelfFundedPingPong.TransactOpts, pause) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) StartPingPong(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "startPingPong") +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) StartPingPong() (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.StartPingPong(&_SelfFundedPingPong.TransactOpts) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) StartPingPong() (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.StartPingPong(&_SelfFundedPingPong.TransactOpts) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "transferOwnership", to) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.TransferOwnership(&_SelfFundedPingPong.TransactOpts, to) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.TransferOwnership(&_SelfFundedPingPong.TransactOpts, to) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) UpdateApprovedSenders(opts *bind.TransactOpts, adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "updateApprovedSenders", adds, removes) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) UpdateApprovedSenders(adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.UpdateApprovedSenders(&_SelfFundedPingPong.TransactOpts, adds, removes) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) UpdateApprovedSenders(adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.UpdateApprovedSenders(&_SelfFundedPingPong.TransactOpts, adds, removes) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) WithdrawNativeToken(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "withdrawNativeToken", to, amount) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) WithdrawNativeToken(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.WithdrawNativeToken(&_SelfFundedPingPong.TransactOpts, to, amount) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) WithdrawNativeToken(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.WithdrawNativeToken(&_SelfFundedPingPong.TransactOpts, to, amount) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) WithdrawTokens(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.Transact(opts, "withdrawTokens", token, to, amount) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) WithdrawTokens(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.WithdrawTokens(&_SelfFundedPingPong.TransactOpts, token, to, amount) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) WithdrawTokens(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.WithdrawTokens(&_SelfFundedPingPong.TransactOpts, token, to, amount) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SelfFundedPingPong.contract.RawTransact(opts, nil) +} + +func (_SelfFundedPingPong *SelfFundedPingPongSession) Receive() (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.Receive(&_SelfFundedPingPong.TransactOpts) +} + +func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) Receive() (*types.Transaction, error) { + return _SelfFundedPingPong.Contract.Receive(&_SelfFundedPingPong.TransactOpts) +} + +type SelfFundedPingPongCountIncrBeforeFundingSetIterator struct { + Event *SelfFundedPingPongCountIncrBeforeFundingSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *SelfFundedPingPongCountIncrBeforeFundingSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongCountIncrBeforeFundingSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongCountIncrBeforeFundingSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *SelfFundedPingPongCountIncrBeforeFundingSetIterator) Error() error { + return it.fail +} + +func (it *SelfFundedPingPongCountIncrBeforeFundingSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type SelfFundedPingPongCountIncrBeforeFundingSet struct { + CountIncrBeforeFunding uint8 + Raw types.Log +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) FilterCountIncrBeforeFundingSet(opts *bind.FilterOpts) (*SelfFundedPingPongCountIncrBeforeFundingSetIterator, error) { + + logs, sub, err := _SelfFundedPingPong.contract.FilterLogs(opts, "CountIncrBeforeFundingSet") + if err != nil { + return nil, err + } + return &SelfFundedPingPongCountIncrBeforeFundingSetIterator{contract: _SelfFundedPingPong.contract, event: "CountIncrBeforeFundingSet", logs: logs, sub: sub}, nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchCountIncrBeforeFundingSet(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongCountIncrBeforeFundingSet) (event.Subscription, error) { + + logs, sub, err := _SelfFundedPingPong.contract.WatchLogs(opts, "CountIncrBeforeFundingSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(SelfFundedPingPongCountIncrBeforeFundingSet) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "CountIncrBeforeFundingSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParseCountIncrBeforeFundingSet(log types.Log) (*SelfFundedPingPongCountIncrBeforeFundingSet, error) { + event := new(SelfFundedPingPongCountIncrBeforeFundingSet) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "CountIncrBeforeFundingSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type SelfFundedPingPongFeeTokenModifiedIterator struct { + Event *SelfFundedPingPongFeeTokenModified + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *SelfFundedPingPongFeeTokenModifiedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongFeeTokenModified) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongFeeTokenModified) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *SelfFundedPingPongFeeTokenModifiedIterator) Error() error { + return it.fail +} + +func (it *SelfFundedPingPongFeeTokenModifiedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type SelfFundedPingPongFeeTokenModified struct { + OldToken common.Address + NewToken common.Address + Raw types.Log +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) FilterFeeTokenModified(opts *bind.FilterOpts, oldToken []common.Address, newToken []common.Address) (*SelfFundedPingPongFeeTokenModifiedIterator, error) { + + var oldTokenRule []interface{} + for _, oldTokenItem := range oldToken { + oldTokenRule = append(oldTokenRule, oldTokenItem) + } + var newTokenRule []interface{} + for _, newTokenItem := range newToken { + newTokenRule = append(newTokenRule, newTokenItem) + } + + logs, sub, err := _SelfFundedPingPong.contract.FilterLogs(opts, "FeeTokenModified", oldTokenRule, newTokenRule) + if err != nil { + return nil, err + } + return &SelfFundedPingPongFeeTokenModifiedIterator{contract: _SelfFundedPingPong.contract, event: "FeeTokenModified", logs: logs, sub: sub}, nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchFeeTokenModified(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongFeeTokenModified, oldToken []common.Address, newToken []common.Address) (event.Subscription, error) { + + var oldTokenRule []interface{} + for _, oldTokenItem := range oldToken { + oldTokenRule = append(oldTokenRule, oldTokenItem) + } + var newTokenRule []interface{} + for _, newTokenItem := range newToken { + newTokenRule = append(newTokenRule, newTokenItem) + } + + logs, sub, err := _SelfFundedPingPong.contract.WatchLogs(opts, "FeeTokenModified", oldTokenRule, newTokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(SelfFundedPingPongFeeTokenModified) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "FeeTokenModified", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParseFeeTokenModified(log types.Log) (*SelfFundedPingPongFeeTokenModified, error) { + event := new(SelfFundedPingPongFeeTokenModified) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "FeeTokenModified", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type SelfFundedPingPongFundedIterator struct { + Event *SelfFundedPingPongFunded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *SelfFundedPingPongFundedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongFunded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongFunded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *SelfFundedPingPongFundedIterator) Error() error { + return it.fail +} + +func (it *SelfFundedPingPongFundedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type SelfFundedPingPongFunded struct { + Raw types.Log +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) FilterFunded(opts *bind.FilterOpts) (*SelfFundedPingPongFundedIterator, error) { + + logs, sub, err := _SelfFundedPingPong.contract.FilterLogs(opts, "Funded") + if err != nil { + return nil, err + } + return &SelfFundedPingPongFundedIterator{contract: _SelfFundedPingPong.contract, event: "Funded", logs: logs, sub: sub}, nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchFunded(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongFunded) (event.Subscription, error) { + + logs, sub, err := _SelfFundedPingPong.contract.WatchLogs(opts, "Funded") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(SelfFundedPingPongFunded) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "Funded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParseFunded(log types.Log) (*SelfFundedPingPongFunded, error) { + event := new(SelfFundedPingPongFunded) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "Funded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type SelfFundedPingPongMessageAbandonedIterator struct { + Event *SelfFundedPingPongMessageAbandoned + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *SelfFundedPingPongMessageAbandonedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongMessageAbandoned) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongMessageAbandoned) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *SelfFundedPingPongMessageAbandonedIterator) Error() error { + return it.fail +} + +func (it *SelfFundedPingPongMessageAbandonedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type SelfFundedPingPongMessageAbandoned struct { + MessageId [32]byte + TokenReceiver common.Address + Raw types.Log +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) FilterMessageAbandoned(opts *bind.FilterOpts, messageId [][32]byte) (*SelfFundedPingPongMessageAbandonedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _SelfFundedPingPong.contract.FilterLogs(opts, "MessageAbandoned", messageIdRule) + if err != nil { + return nil, err + } + return &SelfFundedPingPongMessageAbandonedIterator{contract: _SelfFundedPingPong.contract, event: "MessageAbandoned", logs: logs, sub: sub}, nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchMessageAbandoned(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageAbandoned, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _SelfFundedPingPong.contract.WatchLogs(opts, "MessageAbandoned", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(SelfFundedPingPongMessageAbandoned) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageAbandoned", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParseMessageAbandoned(log types.Log) (*SelfFundedPingPongMessageAbandoned, error) { + event := new(SelfFundedPingPongMessageAbandoned) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageAbandoned", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type SelfFundedPingPongMessageAckReceivedIterator struct { + Event *SelfFundedPingPongMessageAckReceived + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *SelfFundedPingPongMessageAckReceivedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongMessageAckReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongMessageAckReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *SelfFundedPingPongMessageAckReceivedIterator) Error() error { + return it.fail +} + +func (it *SelfFundedPingPongMessageAckReceivedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type SelfFundedPingPongMessageAckReceived struct { + Arg0 [32]byte + Raw types.Log +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) FilterMessageAckReceived(opts *bind.FilterOpts) (*SelfFundedPingPongMessageAckReceivedIterator, error) { + + logs, sub, err := _SelfFundedPingPong.contract.FilterLogs(opts, "MessageAckReceived") + if err != nil { + return nil, err + } + return &SelfFundedPingPongMessageAckReceivedIterator{contract: _SelfFundedPingPong.contract, event: "MessageAckReceived", logs: logs, sub: sub}, nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchMessageAckReceived(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageAckReceived) (event.Subscription, error) { + + logs, sub, err := _SelfFundedPingPong.contract.WatchLogs(opts, "MessageAckReceived") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(SelfFundedPingPongMessageAckReceived) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageAckReceived", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParseMessageAckReceived(log types.Log) (*SelfFundedPingPongMessageAckReceived, error) { + event := new(SelfFundedPingPongMessageAckReceived) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageAckReceived", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type SelfFundedPingPongMessageAckSentIterator struct { + Event *SelfFundedPingPongMessageAckSent + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *SelfFundedPingPongMessageAckSentIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongMessageAckSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongMessageAckSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *SelfFundedPingPongMessageAckSentIterator) Error() error { + return it.fail +} + +func (it *SelfFundedPingPongMessageAckSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type SelfFundedPingPongMessageAckSent struct { + IncomingMessageId [32]byte + Raw types.Log +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) FilterMessageAckSent(opts *bind.FilterOpts) (*SelfFundedPingPongMessageAckSentIterator, error) { + + logs, sub, err := _SelfFundedPingPong.contract.FilterLogs(opts, "MessageAckSent") + if err != nil { + return nil, err + } + return &SelfFundedPingPongMessageAckSentIterator{contract: _SelfFundedPingPong.contract, event: "MessageAckSent", logs: logs, sub: sub}, nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchMessageAckSent(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageAckSent) (event.Subscription, error) { + + logs, sub, err := _SelfFundedPingPong.contract.WatchLogs(opts, "MessageAckSent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(SelfFundedPingPongMessageAckSent) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageAckSent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParseMessageAckSent(log types.Log) (*SelfFundedPingPongMessageAckSent, error) { + event := new(SelfFundedPingPongMessageAckSent) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageAckSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type SelfFundedPingPongMessageFailedIterator struct { + Event *SelfFundedPingPongMessageFailed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *SelfFundedPingPongMessageFailedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongMessageFailed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongMessageFailed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *SelfFundedPingPongMessageFailedIterator) Error() error { + return it.fail +} + +func (it *SelfFundedPingPongMessageFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type SelfFundedPingPongMessageFailed struct { + MessageId [32]byte + Reason []byte + Raw types.Log +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) FilterMessageFailed(opts *bind.FilterOpts, messageId [][32]byte) (*SelfFundedPingPongMessageFailedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _SelfFundedPingPong.contract.FilterLogs(opts, "MessageFailed", messageIdRule) + if err != nil { + return nil, err + } + return &SelfFundedPingPongMessageFailedIterator{contract: _SelfFundedPingPong.contract, event: "MessageFailed", logs: logs, sub: sub}, nil +} + +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchMessageFailed(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageFailed, messageId [][32]byte) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _SelfFundedPingPong.contract.WatchLogs(opts, "MessageFailed", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(SelfFundedPingPongMessageFailed) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageFailed", log); err != nil { + return err + } + event.Raw = log -func (_SelfFundedPingPong *SelfFundedPingPongSession) FundPingPong(pingPongCount *big.Int) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.FundPingPong(&_SelfFundedPingPong.TransactOpts, pingPongCount) + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil } -func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) FundPingPong(pingPongCount *big.Int) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.FundPingPong(&_SelfFundedPingPong.TransactOpts, pingPongCount) +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParseMessageFailed(log types.Log) (*SelfFundedPingPongMessageFailed, error) { + event := new(SelfFundedPingPongMessageFailed) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil } -func (_SelfFundedPingPong *SelfFundedPingPongTransactor) SetCountIncrBeforeFunding(opts *bind.TransactOpts, countIncrBeforeFunding uint8) (*types.Transaction, error) { - return _SelfFundedPingPong.contract.Transact(opts, "setCountIncrBeforeFunding", countIncrBeforeFunding) -} +type SelfFundedPingPongMessageRecoveredIterator struct { + Event *SelfFundedPingPongMessageRecovered -func (_SelfFundedPingPong *SelfFundedPingPongSession) SetCountIncrBeforeFunding(countIncrBeforeFunding uint8) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.SetCountIncrBeforeFunding(&_SelfFundedPingPong.TransactOpts, countIncrBeforeFunding) -} + contract *bind.BoundContract + event string -func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) SetCountIncrBeforeFunding(countIncrBeforeFunding uint8) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.SetCountIncrBeforeFunding(&_SelfFundedPingPong.TransactOpts, countIncrBeforeFunding) + logs chan types.Log + sub ethereum.Subscription + done bool + fail error } -func (_SelfFundedPingPong *SelfFundedPingPongTransactor) SetCounterpart(opts *bind.TransactOpts, counterpartChainSelector uint64, counterpartAddress common.Address) (*types.Transaction, error) { - return _SelfFundedPingPong.contract.Transact(opts, "setCounterpart", counterpartChainSelector, counterpartAddress) -} +func (it *SelfFundedPingPongMessageRecoveredIterator) Next() bool { -func (_SelfFundedPingPong *SelfFundedPingPongSession) SetCounterpart(counterpartChainSelector uint64, counterpartAddress common.Address) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.SetCounterpart(&_SelfFundedPingPong.TransactOpts, counterpartChainSelector, counterpartAddress) -} + if it.fail != nil { + return false + } -func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) SetCounterpart(counterpartChainSelector uint64, counterpartAddress common.Address) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.SetCounterpart(&_SelfFundedPingPong.TransactOpts, counterpartChainSelector, counterpartAddress) -} + if it.done { + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongMessageRecovered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true -func (_SelfFundedPingPong *SelfFundedPingPongTransactor) SetCounterpartAddress(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) { - return _SelfFundedPingPong.contract.Transact(opts, "setCounterpartAddress", addr) -} + default: + return false + } + } -func (_SelfFundedPingPong *SelfFundedPingPongSession) SetCounterpartAddress(addr common.Address) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.SetCounterpartAddress(&_SelfFundedPingPong.TransactOpts, addr) -} + select { + case log := <-it.logs: + it.Event = new(SelfFundedPingPongMessageRecovered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true -func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) SetCounterpartAddress(addr common.Address) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.SetCounterpartAddress(&_SelfFundedPingPong.TransactOpts, addr) + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } } -func (_SelfFundedPingPong *SelfFundedPingPongTransactor) SetCounterpartChainSelector(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) { - return _SelfFundedPingPong.contract.Transact(opts, "setCounterpartChainSelector", chainSelector) +func (it *SelfFundedPingPongMessageRecoveredIterator) Error() error { + return it.fail } -func (_SelfFundedPingPong *SelfFundedPingPongSession) SetCounterpartChainSelector(chainSelector uint64) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.SetCounterpartChainSelector(&_SelfFundedPingPong.TransactOpts, chainSelector) +func (it *SelfFundedPingPongMessageRecoveredIterator) Close() error { + it.sub.Unsubscribe() + return nil } -func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) SetCounterpartChainSelector(chainSelector uint64) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.SetCounterpartChainSelector(&_SelfFundedPingPong.TransactOpts, chainSelector) +type SelfFundedPingPongMessageRecovered struct { + MessageId [32]byte + Raw types.Log } -func (_SelfFundedPingPong *SelfFundedPingPongTransactor) SetPaused(opts *bind.TransactOpts, pause bool) (*types.Transaction, error) { - return _SelfFundedPingPong.contract.Transact(opts, "setPaused", pause) -} +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) FilterMessageRecovered(opts *bind.FilterOpts, messageId [][32]byte) (*SelfFundedPingPongMessageRecoveredIterator, error) { -func (_SelfFundedPingPong *SelfFundedPingPongSession) SetPaused(pause bool) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.SetPaused(&_SelfFundedPingPong.TransactOpts, pause) -} + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } -func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) SetPaused(pause bool) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.SetPaused(&_SelfFundedPingPong.TransactOpts, pause) + logs, sub, err := _SelfFundedPingPong.contract.FilterLogs(opts, "MessageRecovered", messageIdRule) + if err != nil { + return nil, err + } + return &SelfFundedPingPongMessageRecoveredIterator{contract: _SelfFundedPingPong.contract, event: "MessageRecovered", logs: logs, sub: sub}, nil } -func (_SelfFundedPingPong *SelfFundedPingPongTransactor) StartPingPong(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SelfFundedPingPong.contract.Transact(opts, "startPingPong") -} +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchMessageRecovered(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageRecovered, messageId [][32]byte) (event.Subscription, error) { -func (_SelfFundedPingPong *SelfFundedPingPongSession) StartPingPong() (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.StartPingPong(&_SelfFundedPingPong.TransactOpts) -} + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } -func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) StartPingPong() (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.StartPingPong(&_SelfFundedPingPong.TransactOpts) -} + logs, sub, err := _SelfFundedPingPong.contract.WatchLogs(opts, "MessageRecovered", messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: -func (_SelfFundedPingPong *SelfFundedPingPongTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _SelfFundedPingPong.contract.Transact(opts, "transferOwnership", to) -} + event := new(SelfFundedPingPongMessageRecovered) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageRecovered", log); err != nil { + return err + } + event.Raw = log -func (_SelfFundedPingPong *SelfFundedPingPongSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.TransferOwnership(&_SelfFundedPingPong.TransactOpts, to) + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil } -func (_SelfFundedPingPong *SelfFundedPingPongTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _SelfFundedPingPong.Contract.TransferOwnership(&_SelfFundedPingPong.TransactOpts, to) +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParseMessageRecovered(log types.Log) (*SelfFundedPingPongMessageRecovered, error) { + event := new(SelfFundedPingPongMessageRecovered) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageRecovered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil } -type SelfFundedPingPongCountIncrBeforeFundingSetIterator struct { - Event *SelfFundedPingPongCountIncrBeforeFundingSet +type SelfFundedPingPongMessageSentIterator struct { + Event *SelfFundedPingPongMessageSent contract *bind.BoundContract event string @@ -514,7 +1756,7 @@ type SelfFundedPingPongCountIncrBeforeFundingSetIterator struct { fail error } -func (it *SelfFundedPingPongCountIncrBeforeFundingSetIterator) Next() bool { +func (it *SelfFundedPingPongMessageSentIterator) Next() bool { if it.fail != nil { return false @@ -523,7 +1765,7 @@ func (it *SelfFundedPingPongCountIncrBeforeFundingSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SelfFundedPingPongCountIncrBeforeFundingSet) + it.Event = new(SelfFundedPingPongMessageSent) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -538,7 +1780,7 @@ func (it *SelfFundedPingPongCountIncrBeforeFundingSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(SelfFundedPingPongCountIncrBeforeFundingSet) + it.Event = new(SelfFundedPingPongMessageSent) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -553,32 +1795,51 @@ func (it *SelfFundedPingPongCountIncrBeforeFundingSetIterator) Next() bool { } } -func (it *SelfFundedPingPongCountIncrBeforeFundingSetIterator) Error() error { +func (it *SelfFundedPingPongMessageSentIterator) Error() error { return it.fail } -func (it *SelfFundedPingPongCountIncrBeforeFundingSetIterator) Close() error { +func (it *SelfFundedPingPongMessageSentIterator) Close() error { it.sub.Unsubscribe() return nil } -type SelfFundedPingPongCountIncrBeforeFundingSet struct { - CountIncrBeforeFunding uint8 - Raw types.Log +type SelfFundedPingPongMessageSent struct { + IncomingMessageId [32]byte + ACKMessageId [32]byte + Raw types.Log } -func (_SelfFundedPingPong *SelfFundedPingPongFilterer) FilterCountIncrBeforeFundingSet(opts *bind.FilterOpts) (*SelfFundedPingPongCountIncrBeforeFundingSetIterator, error) { +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) FilterMessageSent(opts *bind.FilterOpts, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (*SelfFundedPingPongMessageSentIterator, error) { - logs, sub, err := _SelfFundedPingPong.contract.FilterLogs(opts, "CountIncrBeforeFundingSet") + var incomingMessageIdRule []interface{} + for _, incomingMessageIdItem := range incomingMessageId { + incomingMessageIdRule = append(incomingMessageIdRule, incomingMessageIdItem) + } + var ACKMessageIdRule []interface{} + for _, ACKMessageIdItem := range ACKMessageId { + ACKMessageIdRule = append(ACKMessageIdRule, ACKMessageIdItem) + } + + logs, sub, err := _SelfFundedPingPong.contract.FilterLogs(opts, "MessageSent", incomingMessageIdRule, ACKMessageIdRule) if err != nil { return nil, err } - return &SelfFundedPingPongCountIncrBeforeFundingSetIterator{contract: _SelfFundedPingPong.contract, event: "CountIncrBeforeFundingSet", logs: logs, sub: sub}, nil + return &SelfFundedPingPongMessageSentIterator{contract: _SelfFundedPingPong.contract, event: "MessageSent", logs: logs, sub: sub}, nil } -func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchCountIncrBeforeFundingSet(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongCountIncrBeforeFundingSet) (event.Subscription, error) { +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageSent, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (event.Subscription, error) { - logs, sub, err := _SelfFundedPingPong.contract.WatchLogs(opts, "CountIncrBeforeFundingSet") + var incomingMessageIdRule []interface{} + for _, incomingMessageIdItem := range incomingMessageId { + incomingMessageIdRule = append(incomingMessageIdRule, incomingMessageIdItem) + } + var ACKMessageIdRule []interface{} + for _, ACKMessageIdItem := range ACKMessageId { + ACKMessageIdRule = append(ACKMessageIdRule, ACKMessageIdItem) + } + + logs, sub, err := _SelfFundedPingPong.contract.WatchLogs(opts, "MessageSent", incomingMessageIdRule, ACKMessageIdRule) if err != nil { return nil, err } @@ -588,8 +1849,8 @@ func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchCountIncrBeforeFundi select { case log := <-logs: - event := new(SelfFundedPingPongCountIncrBeforeFundingSet) - if err := _SelfFundedPingPong.contract.UnpackLog(event, "CountIncrBeforeFundingSet", log); err != nil { + event := new(SelfFundedPingPongMessageSent) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageSent", log); err != nil { return err } event.Raw = log @@ -610,17 +1871,17 @@ func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchCountIncrBeforeFundi }), nil } -func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParseCountIncrBeforeFundingSet(log types.Log) (*SelfFundedPingPongCountIncrBeforeFundingSet, error) { - event := new(SelfFundedPingPongCountIncrBeforeFundingSet) - if err := _SelfFundedPingPong.contract.UnpackLog(event, "CountIncrBeforeFundingSet", log); err != nil { +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParseMessageSent(log types.Log) (*SelfFundedPingPongMessageSent, error) { + event := new(SelfFundedPingPongMessageSent) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageSent", log); err != nil { return nil, err } event.Raw = log return event, nil } -type SelfFundedPingPongFundedIterator struct { - Event *SelfFundedPingPongFunded +type SelfFundedPingPongMessageSucceededIterator struct { + Event *SelfFundedPingPongMessageSucceeded contract *bind.BoundContract event string @@ -631,7 +1892,7 @@ type SelfFundedPingPongFundedIterator struct { fail error } -func (it *SelfFundedPingPongFundedIterator) Next() bool { +func (it *SelfFundedPingPongMessageSucceededIterator) Next() bool { if it.fail != nil { return false @@ -640,7 +1901,7 @@ func (it *SelfFundedPingPongFundedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SelfFundedPingPongFunded) + it.Event = new(SelfFundedPingPongMessageSucceeded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -655,7 +1916,7 @@ func (it *SelfFundedPingPongFundedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(SelfFundedPingPongFunded) + it.Event = new(SelfFundedPingPongMessageSucceeded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -670,31 +1931,42 @@ func (it *SelfFundedPingPongFundedIterator) Next() bool { } } -func (it *SelfFundedPingPongFundedIterator) Error() error { +func (it *SelfFundedPingPongMessageSucceededIterator) Error() error { return it.fail } -func (it *SelfFundedPingPongFundedIterator) Close() error { +func (it *SelfFundedPingPongMessageSucceededIterator) Close() error { it.sub.Unsubscribe() return nil } -type SelfFundedPingPongFunded struct { - Raw types.Log +type SelfFundedPingPongMessageSucceeded struct { + MessageId [32]byte + Raw types.Log } -func (_SelfFundedPingPong *SelfFundedPingPongFilterer) FilterFunded(opts *bind.FilterOpts) (*SelfFundedPingPongFundedIterator, error) { +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) FilterMessageSucceeded(opts *bind.FilterOpts, messageId [][32]byte) (*SelfFundedPingPongMessageSucceededIterator, error) { - logs, sub, err := _SelfFundedPingPong.contract.FilterLogs(opts, "Funded") + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _SelfFundedPingPong.contract.FilterLogs(opts, "MessageSucceeded", messageIdRule) if err != nil { return nil, err } - return &SelfFundedPingPongFundedIterator{contract: _SelfFundedPingPong.contract, event: "Funded", logs: logs, sub: sub}, nil + return &SelfFundedPingPongMessageSucceededIterator{contract: _SelfFundedPingPong.contract, event: "MessageSucceeded", logs: logs, sub: sub}, nil } -func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchFunded(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongFunded) (event.Subscription, error) { +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchMessageSucceeded(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageSucceeded, messageId [][32]byte) (event.Subscription, error) { - logs, sub, err := _SelfFundedPingPong.contract.WatchLogs(opts, "Funded") + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _SelfFundedPingPong.contract.WatchLogs(opts, "MessageSucceeded", messageIdRule) if err != nil { return nil, err } @@ -704,8 +1976,8 @@ func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchFunded(opts *bind.Wa select { case log := <-logs: - event := new(SelfFundedPingPongFunded) - if err := _SelfFundedPingPong.contract.UnpackLog(event, "Funded", log); err != nil { + event := new(SelfFundedPingPongMessageSucceeded) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageSucceeded", log); err != nil { return err } event.Raw = log @@ -726,9 +1998,9 @@ func (_SelfFundedPingPong *SelfFundedPingPongFilterer) WatchFunded(opts *bind.Wa }), nil } -func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParseFunded(log types.Log) (*SelfFundedPingPongFunded, error) { - event := new(SelfFundedPingPongFunded) - if err := _SelfFundedPingPong.contract.UnpackLog(event, "Funded", log); err != nil { +func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParseMessageSucceeded(log types.Log) (*SelfFundedPingPongMessageSucceeded, error) { + event := new(SelfFundedPingPongMessageSucceeded) + if err := _SelfFundedPingPong.contract.UnpackLog(event, "MessageSucceeded", log); err != nil { return nil, err } event.Raw = log @@ -1241,12 +2513,34 @@ func (_SelfFundedPingPong *SelfFundedPingPongFilterer) ParsePong(log types.Log) return event, nil } +type SChainConfigs struct { + Disabled bool + Recipient []byte + ExtraArgsBytes []byte +} + func (_SelfFundedPingPong *SelfFundedPingPong) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { case _SelfFundedPingPong.abi.Events["CountIncrBeforeFundingSet"].ID: return _SelfFundedPingPong.ParseCountIncrBeforeFundingSet(log) + case _SelfFundedPingPong.abi.Events["FeeTokenModified"].ID: + return _SelfFundedPingPong.ParseFeeTokenModified(log) case _SelfFundedPingPong.abi.Events["Funded"].ID: return _SelfFundedPingPong.ParseFunded(log) + case _SelfFundedPingPong.abi.Events["MessageAbandoned"].ID: + return _SelfFundedPingPong.ParseMessageAbandoned(log) + case _SelfFundedPingPong.abi.Events["MessageAckReceived"].ID: + return _SelfFundedPingPong.ParseMessageAckReceived(log) + case _SelfFundedPingPong.abi.Events["MessageAckSent"].ID: + return _SelfFundedPingPong.ParseMessageAckSent(log) + case _SelfFundedPingPong.abi.Events["MessageFailed"].ID: + return _SelfFundedPingPong.ParseMessageFailed(log) + case _SelfFundedPingPong.abi.Events["MessageRecovered"].ID: + return _SelfFundedPingPong.ParseMessageRecovered(log) + case _SelfFundedPingPong.abi.Events["MessageSent"].ID: + return _SelfFundedPingPong.ParseMessageSent(log) + case _SelfFundedPingPong.abi.Events["MessageSucceeded"].ID: + return _SelfFundedPingPong.ParseMessageSucceeded(log) case _SelfFundedPingPong.abi.Events["OwnershipTransferRequested"].ID: return _SelfFundedPingPong.ParseOwnershipTransferRequested(log) case _SelfFundedPingPong.abi.Events["OwnershipTransferred"].ID: @@ -1265,10 +2559,42 @@ func (SelfFundedPingPongCountIncrBeforeFundingSet) Topic() common.Hash { return common.HexToHash("0x4768dbf8645b24c54f2887651545d24f748c0d0d1d4c689eb810fb19f0befcf3") } +func (SelfFundedPingPongFeeTokenModified) Topic() common.Hash { + return common.HexToHash("0x4a1cb6b940121ea2ba30fb9b494035cbfe2d4b6b080db8b502150410bef7eb4e") +} + func (SelfFundedPingPongFunded) Topic() common.Hash { return common.HexToHash("0x302777af5d26fab9dd5120c5f1307c65193ebc51daf33244ada4365fab10602c") } +func (SelfFundedPingPongMessageAbandoned) Topic() common.Hash { + return common.HexToHash("0xd5038100bd3dc9631d3c3f4f61a3e53e9d466f40c47af9897292c7b35e32a957") +} + +func (SelfFundedPingPongMessageAckReceived) Topic() common.Hash { + return common.HexToHash("0xef0cb160d3dc564cde61ae97d9981f9c4d92ace727a2ec202b18b223ea832a79") +} + +func (SelfFundedPingPongMessageAckSent) Topic() common.Hash { + return common.HexToHash("0x75944f95ba0be568cb30faeb0ef135cb73d07006939da29722d670a97f5c5b26") +} + +func (SelfFundedPingPongMessageFailed) Topic() common.Hash { + return common.HexToHash("0x55bc02a9ef6f146737edeeb425738006f67f077e7138de3bf84a15bde1a5b56f") +} + +func (SelfFundedPingPongMessageRecovered) Topic() common.Hash { + return common.HexToHash("0xef3bf8c64bc480286c4f3503b870ceb23e648d2d902e31fb7bb46680da6de8ad") +} + +func (SelfFundedPingPongMessageSent) Topic() common.Hash { + return common.HexToHash("0x9102b9031c3c59d8320bf14d84d7d7a3434366b91032fad1c87579cfc62b2372") +} + +func (SelfFundedPingPongMessageSucceeded) Topic() common.Hash { + return common.HexToHash("0xdf6958669026659bac75ba986685e11a7d271284989f565f2802522663e9a70f") +} + func (SelfFundedPingPongOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } @@ -1290,37 +2616,63 @@ func (_SelfFundedPingPong *SelfFundedPingPong) Address() common.Address { } type SelfFundedPingPongInterface interface { + ACKMESSAGEHEADER(opts *bind.CallOpts) ([]byte, error) + GetCountIncrBeforeFunding(opts *bind.CallOpts) (uint8, error) GetCounterpartAddress(opts *bind.CallOpts) (common.Address, error) GetCounterpartChainSelector(opts *bind.CallOpts) (uint64, error) - GetFeeToken(opts *bind.CallOpts) (common.Address, error) + GetMessageContents(opts *bind.CallOpts, messageId [32]byte) (ClientAny2EVMMessage, error) + + GetMessageStatus(opts *bind.CallOpts, messageId [32]byte) (*big.Int, error) GetRouter(opts *bind.CallOpts) (common.Address, error) + IsApprovedSender(opts *bind.CallOpts, sourceChainSelector uint64, senderAddr []byte) (bool, error) + IsPaused(opts *bind.CallOpts) (bool, error) Owner(opts *bind.CallOpts) (common.Address, error) - SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) + SChainConfigs(opts *bind.CallOpts, arg0 uint64) (SChainConfigs, + + error) + + SFeeToken(opts *bind.CallOpts) (common.Address, error) + + SMessageStatus(opts *bind.CallOpts, messageId [32]byte) (uint8, error) TypeAndVersion(opts *bind.CallOpts) (string, error) + AbandonFailedMessage(opts *bind.TransactOpts, messageId [32]byte, receiver common.Address) (*types.Transaction, error) + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) CcipReceive(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) + CcipSend(opts *bind.TransactOpts, destChainSelector uint64, tokenAmounts []ClientEVMTokenAmount, data []byte) (*types.Transaction, error) + + DisableChain(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) + + EnableChain(opts *bind.TransactOpts, chainSelector uint64, recipient []byte, _extraArgsBytes []byte) (*types.Transaction, error) + FundPingPong(opts *bind.TransactOpts, pingPongCount *big.Int) (*types.Transaction, error) + ModifyFeeToken(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) + + ProcessMessage(opts *bind.TransactOpts, message ClientAny2EVMMessage) (*types.Transaction, error) + + RetryFailedMessage(opts *bind.TransactOpts, messageId [32]byte) (*types.Transaction, error) + SetCountIncrBeforeFunding(opts *bind.TransactOpts, countIncrBeforeFunding uint8) (*types.Transaction, error) SetCounterpart(opts *bind.TransactOpts, counterpartChainSelector uint64, counterpartAddress common.Address) (*types.Transaction, error) - SetCounterpartAddress(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) + SetCounterpartAddress(opts *bind.TransactOpts, counterpartAddress common.Address) (*types.Transaction, error) - SetCounterpartChainSelector(opts *bind.TransactOpts, chainSelector uint64) (*types.Transaction, error) + SetCounterpartChainSelector(opts *bind.TransactOpts, counterpartChainSelector uint64) (*types.Transaction, error) SetPaused(opts *bind.TransactOpts, pause bool) (*types.Transaction, error) @@ -1328,18 +2680,74 @@ type SelfFundedPingPongInterface interface { TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + UpdateApprovedSenders(opts *bind.TransactOpts, adds []CCIPClientBaseApprovedSenderUpdate, removes []CCIPClientBaseApprovedSenderUpdate) (*types.Transaction, error) + + WithdrawNativeToken(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) + + WithdrawTokens(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) + + Receive(opts *bind.TransactOpts) (*types.Transaction, error) + FilterCountIncrBeforeFundingSet(opts *bind.FilterOpts) (*SelfFundedPingPongCountIncrBeforeFundingSetIterator, error) WatchCountIncrBeforeFundingSet(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongCountIncrBeforeFundingSet) (event.Subscription, error) ParseCountIncrBeforeFundingSet(log types.Log) (*SelfFundedPingPongCountIncrBeforeFundingSet, error) + FilterFeeTokenModified(opts *bind.FilterOpts, oldToken []common.Address, newToken []common.Address) (*SelfFundedPingPongFeeTokenModifiedIterator, error) + + WatchFeeTokenModified(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongFeeTokenModified, oldToken []common.Address, newToken []common.Address) (event.Subscription, error) + + ParseFeeTokenModified(log types.Log) (*SelfFundedPingPongFeeTokenModified, error) + FilterFunded(opts *bind.FilterOpts) (*SelfFundedPingPongFundedIterator, error) WatchFunded(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongFunded) (event.Subscription, error) ParseFunded(log types.Log) (*SelfFundedPingPongFunded, error) + FilterMessageAbandoned(opts *bind.FilterOpts, messageId [][32]byte) (*SelfFundedPingPongMessageAbandonedIterator, error) + + WatchMessageAbandoned(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageAbandoned, messageId [][32]byte) (event.Subscription, error) + + ParseMessageAbandoned(log types.Log) (*SelfFundedPingPongMessageAbandoned, error) + + FilterMessageAckReceived(opts *bind.FilterOpts) (*SelfFundedPingPongMessageAckReceivedIterator, error) + + WatchMessageAckReceived(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageAckReceived) (event.Subscription, error) + + ParseMessageAckReceived(log types.Log) (*SelfFundedPingPongMessageAckReceived, error) + + FilterMessageAckSent(opts *bind.FilterOpts) (*SelfFundedPingPongMessageAckSentIterator, error) + + WatchMessageAckSent(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageAckSent) (event.Subscription, error) + + ParseMessageAckSent(log types.Log) (*SelfFundedPingPongMessageAckSent, error) + + FilterMessageFailed(opts *bind.FilterOpts, messageId [][32]byte) (*SelfFundedPingPongMessageFailedIterator, error) + + WatchMessageFailed(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageFailed, messageId [][32]byte) (event.Subscription, error) + + ParseMessageFailed(log types.Log) (*SelfFundedPingPongMessageFailed, error) + + FilterMessageRecovered(opts *bind.FilterOpts, messageId [][32]byte) (*SelfFundedPingPongMessageRecoveredIterator, error) + + WatchMessageRecovered(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageRecovered, messageId [][32]byte) (event.Subscription, error) + + ParseMessageRecovered(log types.Log) (*SelfFundedPingPongMessageRecovered, error) + + FilterMessageSent(opts *bind.FilterOpts, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (*SelfFundedPingPongMessageSentIterator, error) + + WatchMessageSent(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageSent, incomingMessageId [][32]byte, ACKMessageId [][32]byte) (event.Subscription, error) + + ParseMessageSent(log types.Log) (*SelfFundedPingPongMessageSent, error) + + FilterMessageSucceeded(opts *bind.FilterOpts, messageId [][32]byte) (*SelfFundedPingPongMessageSucceededIterator, error) + + WatchMessageSucceeded(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongMessageSucceeded, messageId [][32]byte) (event.Subscription, error) + + ParseMessageSucceeded(log types.Log) (*SelfFundedPingPongMessageSucceeded, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*SelfFundedPingPongOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *SelfFundedPingPongOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) diff --git a/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt index d2d6fbcc2a..4f53971262 100644 --- a/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -5,6 +5,10 @@ burn_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnFromMintTokenPool burn_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.bin fee3f82935ce7a26c65e12f19a472a4fccdae62755abdb42d8b0a01f0f06981a burn_mint_token_pool_and_proxy: ../../../contracts/solc/v0.8.24/BurnMintTokenPoolAndProxy/BurnMintTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/BurnMintTokenPoolAndProxy/BurnMintTokenPoolAndProxy.bin c7efa00d2be62a97a814730c8e13aa70794ebfdd38a9f3b3c11554a5dfd70478 burn_with_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.bin a0728e186af74968101135a58a483320ced9ab79b22b1b24ac6994254ee79097 +ccipClient: ../../../contracts/solc/v0.8.24/CCIPClient/CCIPClient.abi ../../../contracts/solc/v0.8.24/CCIPClient/CCIPClient.bin 7a02b5e5da9f1ec593e6916d45a2972330dfe8d4a40eeb3d76fd57b852a7d230 +ccipReceiver: ../../../contracts/solc/v0.8.24/CCIPReceiver/CCIPReceiver.abi ../../../contracts/solc/v0.8.24/CCIPReceiver/CCIPReceiver.bin 4ff0f5166791975a28c8cca820d5b23636877a39db90090aa18ad7d2d122b785 +ccipReceiverWithACK: ../../../contracts/solc/v0.8.24/CCIPReceiverWithACK/CCIPReceiverWithACK.abi ../../../contracts/solc/v0.8.24/CCIPReceiverWithACK/CCIPReceiverWithACK.bin 8f0cb5cff5611460db2527342ac74723ffc2c57afb3866eefe862b0dad2e75bc +ccipSender: ../../../contracts/solc/v0.8.24/CCIPSender/CCIPSender.abi ../../../contracts/solc/v0.8.24/CCIPSender/CCIPSender.bin f79420dab435b1c44d695cc1cfb1771e4ba1a7224814198b4818c043219e337a ccip_config: ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.abi ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.bin c44460757ca0e1b228734b32b9ab03221b93d77bb9f8e2970830779a8be2cb78 commit_store: ../../../contracts/solc/v0.8.24/CommitStore/CommitStore.abi ../../../contracts/solc/v0.8.24/CommitStore/CommitStore.bin ddc26c10c2a52b59624faae9005827b09b98db4566887a736005e8cc37cf8a51 commit_store_helper: ../../../contracts/solc/v0.8.24/CommitStoreHelper/CommitStoreHelper.abi ../../../contracts/solc/v0.8.24/CommitStoreHelper/CommitStoreHelper.bin ebd8aac686fa28a71d4212bcd25a28f8f640d50dce5e50498b2f6b8534890b69 @@ -24,11 +28,11 @@ mock_v3_aggregator_contract: ../../../contracts/solc/v0.8.24/MockV3Aggregator/Mo multi_aggregate_rate_limiter: ../../../contracts/solc/v0.8.24/MultiAggregateRateLimiter/MultiAggregateRateLimiter.abi ../../../contracts/solc/v0.8.24/MultiAggregateRateLimiter/MultiAggregateRateLimiter.bin abb0ecb1ed8621f26e43b39f5fa25f3d0b6d6c184fa37c404c4389605ecb74e7 nonce_manager: ../../../contracts/solc/v0.8.24/NonceManager/NonceManager.abi ../../../contracts/solc/v0.8.24/NonceManager/NonceManager.bin cdc11c1ab4c1c3fd77f30215e9c579404a6e60eb9adc213d73ca0773c3bb5784 ocr3_config_encoder: ../../../contracts/solc/v0.8.24/IOCR3ConfigEncoder/IOCR3ConfigEncoder.abi ../../../contracts/solc/v0.8.24/IOCR3ConfigEncoder/IOCR3ConfigEncoder.bin e21180898e1ad54a045ee20add85a2793c681425ea06f66d1a9e5cab128b6487 -ping_pong_demo: ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.abi ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.bin 1588313bb5e781d181a825247d30828f59007700f36b4b9b00391592b06ff4b4 +ping_pong_demo: ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.abi ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.bin fa113052eafd644fd9d25558bf13ebf0be15e51de93477d74eea913801d0f752 price_registry: ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.abi ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.bin 0b3e253684d7085aa11f9179b71453b9db9d11cabea41605d5b4ac4128f85bfb registry_module_owner_custom: ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.abi ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.bin cbe7698bfd811b485ac3856daf073a7bdebeefdf2583403ca4a19d5b7e2d4ae8 router: ../../../contracts/solc/v0.8.24/Router/Router.abi ../../../contracts/solc/v0.8.24/Router/Router.bin 42576577e81beea9a069bd9229caaa9a71227fbaef3871a1a2e69fd218216290 -self_funded_ping_pong: ../../../contracts/solc/v0.8.24/SelfFundedPingPong/SelfFundedPingPong.abi ../../../contracts/solc/v0.8.24/SelfFundedPingPong/SelfFundedPingPong.bin 86e169636e5633854ed0b709c804066b615040bceba25aa5137450fbe6f76fa3 +self_funded_ping_pong: ../../../contracts/solc/v0.8.24/SelfFundedPingPong/SelfFundedPingPong.abi ../../../contracts/solc/v0.8.24/SelfFundedPingPong/SelfFundedPingPong.bin eedfacbd19d13edfbddae5a693aa58c31595732ecb54f371d3155da244b65344 token_admin_registry: ../../../contracts/solc/v0.8.24/TokenAdminRegistry/TokenAdminRegistry.abi ../../../contracts/solc/v0.8.24/TokenAdminRegistry/TokenAdminRegistry.bin fb06d2cf5f7476e512c6fb7aab8eab43545efd7f0f6ca133c64ff4e3963902c4 token_pool: ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.abi ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.bin 47a83e91b28ad1381a2a5882e2adfe168809a63a8f533ab1631f174550c64bed usdc_token_pool: ../../../contracts/solc/v0.8.24/USDCTokenPool/USDCTokenPool.abi ../../../contracts/solc/v0.8.24/USDCTokenPool/USDCTokenPool.bin 48caf06855a2f60455364d384e5fb2e6ecdf0a9ce4c1fc706b54b9885df76695 diff --git a/core/gethwrappers/ccip/go_generate.go b/core/gethwrappers/ccip/go_generate.go index a5eaa37523..2838a0e444 100644 --- a/core/gethwrappers/ccip/go_generate.go +++ b/core/gethwrappers/ccip/go_generate.go @@ -35,9 +35,14 @@ package ccip //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.abi ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.bin PingPongDemo ping_pong_demo //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/SelfFundedPingPong/SelfFundedPingPong.abi ../../../contracts/solc/v0.8.24/SelfFundedPingPong/SelfFundedPingPong.bin SelfFundedPingPong self_funded_ping_pong //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MessageHasher/MessageHasher.abi ../../../contracts/solc/v0.8.24/MessageHasher/MessageHasher.bin MessageHasher message_hasher -//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/EtherSenderReceiver/EtherSenderReceiver.abi ../../../contracts/solc/v0.8.24/EtherSenderReceiver/EtherSenderReceiver.bin EtherSenderReceiver ether_sender_receiver //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/WETH9/WETH9.abi ../../../contracts/solc/v0.8.24/WETH9/WETH9.bin WETH9 weth9 +// Audited Reference Contracts +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/CCIPReceiver/CCIPReceiver.abi ../../../contracts/solc/v0.8.24/CCIPReceiver/CCIPReceiver.bin CCIPReceiver ccipReceiver +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/CCIPClient/CCIPClient.abi ../../../contracts/solc/v0.8.24/CCIPClient/CCIPClient.bin CCIPClient ccipClient +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/CCIPSender/CCIPSender.abi ../../../contracts/solc/v0.8.24/CCIPSender/CCIPSender.bin CCIPSender ccipSender +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/CCIPReceiverWithACK/CCIPReceiverWithACK.abi ../../../contracts/solc/v0.8.24/CCIPReceiverWithACK/CCIPReceiverWithACK.bin CCIPReceiverWithACK ccipReceiverWithACK + // Customer contracts //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/USDCTokenPool/USDCTokenPool.abi ../../../contracts/solc/v0.8.24/USDCTokenPool/USDCTokenPool.bin USDCTokenPool usdc_token_pool