diff --git a/packages/hardhat/contracts/CCIPInternal.sol b/packages/hardhat/contracts/CCIPInternal.sol index ecdf5a6dd..0d0623e2a 100644 --- a/packages/hardhat/contracts/CCIPInternal.sol +++ b/packages/hardhat/contracts/CCIPInternal.sol @@ -58,8 +58,8 @@ contract CCIPInternal is CCIPReceiver, ICCIP { IRouterClient router = IRouterClient(this.getRouter()); uint256 fees = router.getFee(_destinationChainSelector, evm2AnyMessage); - if (fees > address(s_linkToken).balance) { - revert NotEnoughBalance(address(s_linkToken).balance, fees); + if (fees > IERC20(s_linkToken).balanceOf(address(this))) { + revert NotEnoughBalance(IERC20(s_linkToken).balanceOf(address(this)), fees); } IERC20(_token).approve(address(router), _amount); diff --git a/packages/hardhat/hardhat.config.ts b/packages/hardhat/hardhat.config.ts index 4c20fe10d..fd63517a5 100644 --- a/packages/hardhat/hardhat.config.ts +++ b/packages/hardhat/hardhat.config.ts @@ -148,13 +148,34 @@ const config: HardhatUserConfig = { // }, }, etherscan: { - apiKey: `${etherscanApiKey}`, - }, - verify: { - etherscan: { - apiKey: `${etherscanApiKey}`, + apiKey: { + polygonMumbai: process.env.MUMBAI_SCAN_API_KEY, + avalancheFuji: "snowtrace", }, + customChains: [ + { + network: "polygonMumbai", + chainId: 80001, + urls: { + apiURL: "https://api-testnet.polygonscan.com/api", + browserURL: "https://mumbai.polygonscan.com", + }, + }, + { + network: "avalancheFuji", + chainId: 43114, + urls: { + apiURL: "https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan", + browserURL: "https://snowtrace.io", + }, + }, + ], }, + // verify: { + // etherscan: { + // apiKey: `${etherscanApiKey}`, + // }, + // }, sourcify: { enabled: false, }, diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index 19736e80a..0f326f887 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -1190,9 +1190,9 @@ const deployedContracts = { }, }, }, - 80001: { + 43113: { CFunctions: { - address: "0xa866BAcF9b8cf8beFC424Ec1EA253c0Ee7240118", + address: "0x4e6D462064140caB21eDf38626a87A50156177B0", abi: [ { inputs: [ @@ -1217,14 +1217,9 @@ const deployedContracts = { type: "uint64", }, { - internalType: "address", - name: "_externalCcipContract", - type: "address", - }, - { - internalType: "address payable", - name: "_internalCcipContract", - type: "address", + internalType: "uint64", + name: "_chainSelector", + type: "uint64", }, ], stateMutability: "nonpayable", @@ -1250,6 +1245,17 @@ const deployedContracts = { name: "NotAllowed", type: "error", }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "NotCCIPContract", + type: "error", + }, { inputs: [], name: "OnlyRouterCanFulfill", @@ -1412,13 +1418,13 @@ const deployedContracts = { type: "bytes32", }, { - indexed: true, + indexed: false, internalType: "address", name: "sender", type: "address", }, { - indexed: true, + indexed: false, internalType: "address", name: "recipient", type: "address", @@ -1435,10 +1441,59 @@ const deployedContracts = { name: "token", type: "address", }, + { + indexed: false, + internalType: "uint64", + name: "srcChainSelector", + type: "uint64", + }, ], name: "UnconfirmedTXAdded", type: "event", }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint64", + name: "dstChainSelector", + type: "uint64", + }, + ], + name: "UnconfirmedTXSent", + type: "event", + }, { inputs: [], name: "acceptOwnership", @@ -1493,35 +1548,10 @@ const deployedContracts = { }, ], name: "addUnconfirmedTX", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], + outputs: [], stateMutability: "nonpayable", type: "function", }, - { - inputs: [ - { - internalType: "bytes32", - name: "_bytes32", - type: "bytes32", - }, - ], - name: "bytes32ToString", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "pure", - type: "function", - }, { inputs: [ { @@ -1584,6 +1614,68 @@ const deployedContracts = { stateMutability: "nonpayable", type: "function", }, + { + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "requests", + outputs: [ + { + internalType: "enum IFunctions.RequestType", + name: "requestType", + type: "uint8", + }, + { + internalType: "bool", + name: "isPending", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint64", + name: "dstChainSelector", + type: "uint64", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "sendUnconfirmedTX", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -1697,6 +1789,1952 @@ const deployedContracts = { "@chainlink/contracts-ccip/src/v0.8/shared/access/ConfirmedOwner.sol", }, }, + ConceroCCIP: { + address: "0x12507d88030C61Daeb09DF8CA8564E68eeb39db4", + abi: [ + { + inputs: [ + { + internalType: "address", + name: "_link", + type: "address", + }, + { + internalType: "address", + name: "_ccipRouter", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_dstChainSelector", + type: "uint64", + }, + ], + name: "DestinationChainNotAllowed", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "FailedToWithdrawEth", + type: "error", + }, + { + inputs: [], + name: "InvalidReceiverAddress", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "router", + type: "address", + }, + ], + name: "InvalidRouter", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_fees", + type: "uint256", + }, + { + internalType: "uint256", + name: "_feeToken", + type: "uint256", + }, + ], + name: "NotEnoughBalance", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "_sender", + type: "address", + }, + ], + name: "NotFunctionContract", + type: "error", + }, + { + inputs: [], + name: "NothingToWithdraw", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "_sender", + type: "address", + }, + ], + name: "SenderNotAllowed", + type: "error", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_sourceChainSelector", + type: "uint64", + }, + ], + name: "SourceChainNotAllowed", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint64", + name: "srcChainSelector", + type: "uint64", + }, + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "CCIPReceived", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint64", + name: "dstChainSelector", + type: "uint64", + }, + ], + name: "CCIPSent", + 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: true, + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "TXReleased", + type: "event", + }, + { + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], + name: "allowListedDstChains", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "allowListedSenderContracts", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], + name: "allowListedSrcChains", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + 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: "struct Client.EVMTokenAmount[]", + name: "destTokenAmounts", + type: "tuple[]", + }, + ], + internalType: "struct Client.Any2EVMMessage", + name: "message", + type: "tuple", + }, + ], + name: "ccipReceive", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], + name: "dstConceroCCIPContracts", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getRouter", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_ccipMessageId", + type: "bytes32", + }, + { + internalType: "address", + name: "_sender", + type: "address", + }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "sendTokenToEoa", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_dstChainSelector", + type: "uint64", + }, + { + internalType: "bool", + name: "allowed", + type: "bool", + }, + ], + name: "setAllowDestinationChain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_sender", + type: "address", + }, + { + internalType: "bool", + name: "allowed", + type: "bool", + }, + ], + name: "setAllowListSender", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_srcChainSelector", + type: "uint64", + }, + { + internalType: "bool", + name: "allowed", + type: "bool", + }, + ], + name: "setAllowSourceChain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_chainSelector", + type: "uint64", + }, + { + internalType: "address", + name: "_dstConceroCCIPContract", + type: "address", + }, + ], + name: "setDstConceroCCIPContract", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_internalFunctionContract", + type: "address", + }, + ], + name: "setInternalFunctionContract", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "uint64", + name: "_destinationChainSelector", + type: "uint64", + }, + { + internalType: "address", + name: "_receiver", + type: "address", + }, + ], + name: "startTransaction", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "withdrawToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, + ], + inheritedFunctions: { + allowListedDstChains: "contracts/CCIPInternal.sol", + allowListedSenderContracts: "contracts/CCIPInternal.sol", + allowListedSrcChains: "contracts/CCIPInternal.sol", + ccipReceive: "contracts/CCIPInternal.sol", + dstConceroCCIPContracts: "contracts/CCIPInternal.sol", + getRouter: "contracts/CCIPInternal.sol", + supportsInterface: "contracts/CCIPInternal.sol", + acceptOwnership: + "@chainlink/contracts-ccip/src/v0.8/shared/access/ConfirmedOwner.sol", + owner: + "@chainlink/contracts-ccip/src/v0.8/shared/access/ConfirmedOwner.sol", + transferOwnership: + "@chainlink/contracts-ccip/src/v0.8/shared/access/ConfirmedOwner.sol", + }, + }, + }, + 80001: { + CFunctions: { + address: "0x936c74b937c4794302ec069269dA152BA94736f6", + abi: [ + { + inputs: [ + { + internalType: "address", + name: "_router", + type: "address", + }, + { + internalType: "bytes32", + name: "_donId", + type: "bytes32", + }, + { + internalType: "uint64", + name: "_subscriptionId", + type: "uint64", + }, + { + internalType: "uint64", + name: "_donHostedSecretsVersion", + type: "uint64", + }, + { + internalType: "uint64", + name: "_chainSelector", + type: "uint64", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "EmptyArgs", + type: "error", + }, + { + inputs: [], + name: "EmptySource", + type: "error", + }, + { + inputs: [], + name: "NoInlineSecrets", + type: "error", + }, + { + inputs: [], + name: "NotAllowed", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "NotCCIPContract", + type: "error", + }, + { + inputs: [], + name: "OnlyRouterCanFulfill", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + { + internalType: "bool", + name: "isConfirmed", + type: "bool", + }, + ], + name: "TXAlreadyExists", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "UnexpectedRequestID", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "walletAddress", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "status", + type: "bool", + }, + ], + name: "AllowlistUpdated", + 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: true, + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + ], + name: "RequestFulfilled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + ], + name: "RequestSent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "TXConfirmed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint64", + name: "srcChainSelector", + type: "uint64", + }, + ], + name: "UnconfirmedTXAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint64", + name: "dstChainSelector", + type: "uint64", + }, + ], + name: "UnconfirmedTXSent", + type: "event", + }, + { + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_walletAddress", + type: "address", + }, + ], + name: "addToAllowlist", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint64", + name: "srcChainSelector", + type: "uint64", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "addUnconfirmedTX", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + ], + name: "deleteTransaction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "requestId", + type: "bytes32", + }, + { + internalType: "bytes", + name: "response", + type: "bytes", + }, + { + internalType: "bytes", + name: "err", + type: "bytes", + }, + ], + name: "handleOracleFulfillment", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_walletAddress", + type: "address", + }, + ], + name: "removeFromAllowlist", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "requests", + outputs: [ + { + internalType: "enum IFunctions.RequestType", + name: "requestType", + type: "uint8", + }, + { + internalType: "bool", + name: "isPending", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint64", + name: "dstChainSelector", + type: "uint64", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "sendUnconfirmedTX", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_version", + type: "uint64", + }, + ], + name: "setDonHostedSecretsVersion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_externalCcipContract", + type: "address", + }, + ], + name: "setExternalCcipContract", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address payable", + name: "_internalCcipContract", + type: "address", + }, + ], + name: "setInternalCcipContract", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "transactions", + outputs: [ + { + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint64", + name: "srcChainSelector", + type: "uint64", + }, + { + internalType: "bool", + name: "isConfirmed", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ], + inheritedFunctions: { + handleOracleFulfillment: + "@chainlink/contracts/src/v0.8/functions/v1_0_0/FunctionsClient.sol", + acceptOwnership: + "@chainlink/contracts-ccip/src/v0.8/shared/access/ConfirmedOwner.sol", + owner: + "@chainlink/contracts-ccip/src/v0.8/shared/access/ConfirmedOwner.sol", + transferOwnership: + "@chainlink/contracts-ccip/src/v0.8/shared/access/ConfirmedOwner.sol", + }, + }, + ConceroCCIP: { + address: "0x711B1B06f5bb85Ca516ed97c2882542A9701c4a3", + abi: [ + { + inputs: [ + { + internalType: "address", + name: "_link", + type: "address", + }, + { + internalType: "address", + name: "_ccipRouter", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_dstChainSelector", + type: "uint64", + }, + ], + name: "DestinationChainNotAllowed", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "FailedToWithdrawEth", + type: "error", + }, + { + inputs: [], + name: "InvalidReceiverAddress", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "router", + type: "address", + }, + ], + name: "InvalidRouter", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_fees", + type: "uint256", + }, + { + internalType: "uint256", + name: "_feeToken", + type: "uint256", + }, + ], + name: "NotEnoughBalance", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "_sender", + type: "address", + }, + ], + name: "NotFunctionContract", + type: "error", + }, + { + inputs: [], + name: "NothingToWithdraw", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "_sender", + type: "address", + }, + ], + name: "SenderNotAllowed", + type: "error", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_sourceChainSelector", + type: "uint64", + }, + ], + name: "SourceChainNotAllowed", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint64", + name: "srcChainSelector", + type: "uint64", + }, + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "CCIPReceived", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint64", + name: "dstChainSelector", + type: "uint64", + }, + ], + name: "CCIPSent", + 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: true, + internalType: "bytes32", + name: "ccipMessageId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "TXReleased", + type: "event", + }, + { + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], + name: "allowListedDstChains", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "allowListedSenderContracts", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], + name: "allowListedSrcChains", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + 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: "struct Client.EVMTokenAmount[]", + name: "destTokenAmounts", + type: "tuple[]", + }, + ], + internalType: "struct Client.Any2EVMMessage", + name: "message", + type: "tuple", + }, + ], + name: "ccipReceive", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], + name: "dstConceroCCIPContracts", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getRouter", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_ccipMessageId", + type: "bytes32", + }, + { + internalType: "address", + name: "_sender", + type: "address", + }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "sendTokenToEoa", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_dstChainSelector", + type: "uint64", + }, + { + internalType: "bool", + name: "allowed", + type: "bool", + }, + ], + name: "setAllowDestinationChain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_sender", + type: "address", + }, + { + internalType: "bool", + name: "allowed", + type: "bool", + }, + ], + name: "setAllowListSender", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_srcChainSelector", + type: "uint64", + }, + { + internalType: "bool", + name: "allowed", + type: "bool", + }, + ], + name: "setAllowSourceChain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_chainSelector", + type: "uint64", + }, + { + internalType: "address", + name: "_dstConceroCCIPContract", + type: "address", + }, + ], + name: "setDstConceroCCIPContract", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_internalFunctionContract", + type: "address", + }, + ], + name: "setInternalFunctionContract", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "uint64", + name: "_destinationChainSelector", + type: "uint64", + }, + { + internalType: "address", + name: "_receiver", + type: "address", + }, + ], + name: "startTransaction", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "withdrawToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, + ], + inheritedFunctions: { + allowListedDstChains: "contracts/CCIPInternal.sol", + allowListedSenderContracts: "contracts/CCIPInternal.sol", + allowListedSrcChains: "contracts/CCIPInternal.sol", + ccipReceive: "contracts/CCIPInternal.sol", + dstConceroCCIPContracts: "contracts/CCIPInternal.sol", + getRouter: "contracts/CCIPInternal.sol", + supportsInterface: "contracts/CCIPInternal.sol", + acceptOwnership: + "@chainlink/contracts-ccip/src/v0.8/shared/access/ConfirmedOwner.sol", + owner: + "@chainlink/contracts-ccip/src/v0.8/shared/access/ConfirmedOwner.sol", + transferOwnership: + "@chainlink/contracts-ccip/src/v0.8/shared/access/ConfirmedOwner.sol", + }, + }, }, } as const;