Files

779 lines
36 KiB
JSON
Raw Permalink Normal View History

{
"_format": "hh-sol-artifact-1",
"contractName": "CCIPRouterOptimized",
"sourceName": "contracts/ccip/CCIPRouterOptimized.sol",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"name": "AddressEmptyCode",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "AddressInsufficientBalance",
"type": "error"
},
{
"inputs": [],
"name": "FailedInnerCall",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "SafeERC20FailedOperation",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "oldFee",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newFee",
"type": "uint256"
}
],
"name": "BaseFeeUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "cacheKey",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fee",
"type": "uint256"
}
],
"name": "FeeCached",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "batchId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "messageCount",
"type": "uint256"
}
],
"name": "MessageBatched",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "messageId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "uint64",
"name": "sourceChainSelector",
"type": "uint64"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"components": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "enum IRouterClient.TokenAmountType",
"name": "amountType",
"type": "uint8"
}
],
"indexed": false,
"internalType": "struct IRouterClient.TokenAmount[]",
"name": "tokenAmounts",
"type": "tuple[]"
}
],
"name": "MessageReceived",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "messageId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "uint64",
"name": "destinationChainSelector",
"type": "uint64"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes",
"name": "receiver",
"type": "bytes"
},
{
"indexed": false,
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"components": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "enum IRouterClient.TokenAmountType",
"name": "amountType",
"type": "uint8"
}
],
"indexed": false,
"internalType": "struct IRouterClient.TokenAmount[]",
"name": "tokenAmounts",
"type": "tuple[]"
},
{
"indexed": false,
"internalType": "address",
"name": "feeToken",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes",
"name": "extraArgs",
"type": "bytes"
}
],
"name": "MessageSent",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldAdmin",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "RouterAdminChanged",
"type": "event"
},
{
"inputs": [],
"name": "admin",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "baseFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "batchId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "destinationChainSelector",
"type": "uint64"
},
{
"components": [
{
"internalType": "bytes",
"name": "receiver",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"components": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "enum IRouterClient.TokenAmountType",
"name": "amountType",
"type": "uint8"
}
],
"internalType": "struct IRouterClient.TokenAmount[]",
"name": "tokenAmounts",
"type": "tuple[]"
},
{
"internalType": "address",
"name": "feeToken",
"type": "address"
},
{
"internalType": "bytes",
"name": "extraArgs",
"type": "bytes"
}
],
"internalType": "struct IRouterClient.EVM2AnyMessage[]",
"name": "messages",
"type": "tuple[]"
}
],
"name": "batchSend",
"outputs": [
{
"internalType": "uint256",
"name": "batchId_",
"type": "uint256"
},
{
"internalType": "bytes32[]",
"name": "messageIds",
"type": "bytes32[]"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "batchWindow",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "batches",
"outputs": [
{
"internalType": "uint64",
"name": "destinationChainSelector",
"type": "uint64"
},
{
"internalType": "uint256",
"name": "totalFee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "cacheExpiry",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "destinationChainSelector",
"type": "uint64"
},
{
"internalType": "bytes",
"name": "receiver",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "dataLength",
"type": "uint256"
}
],
"name": "cacheFee",
"outputs": [
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "cacheTimestamp",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "cachedFees",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "destinationChainSelector",
"type": "uint64"
},
{
"components": [
{
"internalType": "bytes",
"name": "receiver",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"components": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "enum IRouterClient.TokenAmountType",
"name": "amountType",
"type": "uint8"
}
],
"internalType": "struct IRouterClient.TokenAmount[]",
"name": "tokenAmounts",
"type": "tuple[]"
},
{
"internalType": "address",
"name": "feeToken",
"type": "address"
},
{
"internalType": "bytes",
"name": "extraArgs",
"type": "bytes"
}
],
"internalType": "struct IRouterClient.EVM2AnyMessage",
"name": "message",
"type": "tuple"
}
],
"name": "ccipSend",
"outputs": [
{
"internalType": "bytes32",
"name": "messageId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "fees",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "changeAdmin",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "dataFeePerByte",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "destinationChainSelector",
"type": "uint64"
},
{
"components": [
{
"internalType": "bytes",
"name": "receiver",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"components": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "enum IRouterClient.TokenAmountType",
"name": "amountType",
"type": "uint8"
}
],
"internalType": "struct IRouterClient.TokenAmount[]",
"name": "tokenAmounts",
"type": "tuple[]"
},
{
"internalType": "address",
"name": "feeToken",
"type": "address"
},
{
"internalType": "bytes",
"name": "extraArgs",
"type": "bytes"
}
],
"internalType": "struct IRouterClient.EVM2AnyMessage",
"name": "message",
"type": "tuple"
}
],
"name": "getFee",
"outputs": [
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "destinationChainSelector",
"type": "uint64"
}
],
"name": "getSupportedTokens",
"outputs": [
{
"internalType": "address[]",
"name": "",
"type": "address[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxBatchSize",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newWindow",
"type": "uint256"
}
],
"name": "setBatchWindow",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newExpiry",
"type": "uint256"
}
],
"name": "setCacheExpiry",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newSize",
"type": "uint256"
}
],
"name": "setMaxBatchSize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "supportedTokens",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "tokenFeePerToken",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newFee",
"type": "uint256"
}
],
"name": "updateBaseFee",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x6080806040523461005057670de0b6b3a764000060018190556103e8600255600355610e1060065561012c600a556064600b55600080546001600160a01b031916331790556112dc90816100568239f35b600080fdfe60806040908082526004918236101561001757600080fd5b600091823560e01c9081630352d6bb14610daf575080630feb7ce514610d9157806313bceaac14610d735780632913daa014610d555780632b26a6bf14610cc157806340be7fe3146109055780634972134a146108e757806349afd5d8146108c9578063531cdd4b146108a1578063576e9e521461087f5780636ef25c3a14610861578063769dd8d31461080e5780638e6901861461074b5780638f28397014610684578063b32c4d8d14610636578063c1aac10414610347578063c7fe2e0414610319578063e9889be1146102fb578063f45c0e25146102cd578063f851a440146102a6578063fbca3b74146101e45763ff7293471461011757600080fd5b346101e05760603660031901126101e057610130610dd5565b926024356001600160401b0381116101dc5760209461015861017e9361019893369101610e59565b60443593849161017087519384928b84019687611134565b03601f198101835282610df0565b5190209161019260015491600254906110fc565b906110b6565b928181526005855283838220556007855282429120557f350d2c2bd9e70c4432dd66cace4b442fe11796fecc7159a3df3b9905e4c5b9fc848351858152a251908152f35b8380fd5b5080fd5b509190346102a357602091826003193601126101e0576001600160401b0361020d949394610dd5565b1682528352818120908251808584549182815201908194845286842090845b8181106102865750505081610242910382610df0565b83519485948186019282875251809352850193925b82811061026657505050500390f35b83516001600160a01b031685528695509381019392810192600101610257565b82546001600160a01b03168452928801926001928301920161022c565b80fd5b50346101e057816003193601126101e057905490516001600160a01b039091168152602090f35b8284346101e05760203660031901126101e0576102f460018060a01b038354163314611040565b3560065580f35b50346101e057816003193601126101e0576020906006549051908152f35b8284346101e05760203660031901126101e05761034060018060a01b038354163314611040565b35600a5580f35b50919061035336611005565b919084610360848361115f565b93846104c5575b929050602092838101805188516103a8606082898101944286528d4390830152610399815180928d86860191016110d9565b8101038c810184520182610df0565b51902096828893519251948a8201519260018060a01b03918c6103f2608085606088015116960151996103e583519960a08b5260a08b019061110f565b8981038a8f01529061110f565b91878303828901528b808851948581520197019481925b84841061046a57505050505050509161045d81927f3e9ab9625e2124db7ba80fa471e9750c5ab5b060d19ff325020b0f00fcdc489794606084015282810360808401526001600160401b033398169661110f565b0390a48351928352820152f35b909294969791939580999a50518381511683528d8082015190840152015160028110156104b2578f828e926060926001950152019801930190918d989796959394928f610409565b634e487b7160e01b845260218752602484fd5b60608101519091506001600160a01b03168061054857508334106104ea578590610367565b855162461bcd60e51b8152602081870152603260248201527f43434950526f757465724f7074696d697a65643a20696e73756666696369656e60448201527174206e617469766520746f6b656e2066656560701b6064820152608490fd5b865160208101906323b872dd60e01b82523360248201523060448201528660648201526064815260a081018181106001600160401b03821117610623578952516105c2918691829182865af13d1561061b573d906105a582610e3e565b916105b28b519384610df0565b82523d87602084013e5b83611243565b80519081151591826105f3575b50506105dd57508590610367565b85602491885191635274afe760e01b8352820152fd5b819250906020918101031261061757602001518015908115036106175738806105cf565b8480fd5b6060906105bc565b634e487b7160e01b875260418952602487fd5b5082346106805760203660031901126106805760609282913581526008602052206001600160401b0360018201541691600360028301549201549181519384526020840152820152f35b8280fd5b508234610680576020366003190112610680576001600160a01b03813581811693919290849003610617578454928316916106c0833314611040565b84156106fe57505082907fe23b80c73a660924729e3a56cc85a00d5599a0270943d409a14d777d91d675d58580a36001600160a01b03191617815580f35b906020608492519162461bcd60e51b8352820152602160248201527f43434950526f757465724f7074696d697a65643a207a65726f206164647265736044820152607360f81b6064820152fd5b508290346106805760203660031901126106805781359161077660018060a01b038554163314611040565b82156107b457507f19ad72acd40a59cad104f97c7897cc5675e52fe1e2679088c4bfffd96a9d58a79060
"deployedBytecode": "0x60806040908082526004918236101561001757600080fd5b600091823560e01c9081630352d6bb14610daf575080630feb7ce514610d9157806313bceaac14610d735780632913daa014610d555780632b26a6bf14610cc157806340be7fe3146109055780634972134a146108e757806349afd5d8146108c9578063531cdd4b146108a1578063576e9e521461087f5780636ef25c3a14610861578063769dd8d31461080e5780638e6901861461074b5780638f28397014610684578063b32c4d8d14610636578063c1aac10414610347578063c7fe2e0414610319578063e9889be1146102fb578063f45c0e25146102cd578063f851a440146102a6578063fbca3b74146101e45763ff7293471461011757600080fd5b346101e05760603660031901126101e057610130610dd5565b926024356001600160401b0381116101dc5760209461015861017e9361019893369101610e59565b60443593849161017087519384928b84019687611134565b03601f198101835282610df0565b5190209161019260015491600254906110fc565b906110b6565b928181526005855283838220556007855282429120557f350d2c2bd9e70c4432dd66cace4b442fe11796fecc7159a3df3b9905e4c5b9fc848351858152a251908152f35b8380fd5b5080fd5b509190346102a357602091826003193601126101e0576001600160401b0361020d949394610dd5565b1682528352818120908251808584549182815201908194845286842090845b8181106102865750505081610242910382610df0565b83519485948186019282875251809352850193925b82811061026657505050500390f35b83516001600160a01b031685528695509381019392810192600101610257565b82546001600160a01b03168452928801926001928301920161022c565b80fd5b50346101e057816003193601126101e057905490516001600160a01b039091168152602090f35b8284346101e05760203660031901126101e0576102f460018060a01b038354163314611040565b3560065580f35b50346101e057816003193601126101e0576020906006549051908152f35b8284346101e05760203660031901126101e05761034060018060a01b038354163314611040565b35600a5580f35b50919061035336611005565b919084610360848361115f565b93846104c5575b929050602092838101805188516103a8606082898101944286528d4390830152610399815180928d86860191016110d9565b8101038c810184520182610df0565b51902096828893519251948a8201519260018060a01b03918c6103f2608085606088015116960151996103e583519960a08b5260a08b019061110f565b8981038a8f01529061110f565b91878303828901528b808851948581520197019481925b84841061046a57505050505050509161045d81927f3e9ab9625e2124db7ba80fa471e9750c5ab5b060d19ff325020b0f00fcdc489794606084015282810360808401526001600160401b033398169661110f565b0390a48351928352820152f35b909294969791939580999a50518381511683528d8082015190840152015160028110156104b2578f828e926060926001950152019801930190918d989796959394928f610409565b634e487b7160e01b845260218752602484fd5b60608101519091506001600160a01b03168061054857508334106104ea578590610367565b855162461bcd60e51b8152602081870152603260248201527f43434950526f757465724f7074696d697a65643a20696e73756666696369656e60448201527174206e617469766520746f6b656e2066656560701b6064820152608490fd5b865160208101906323b872dd60e01b82523360248201523060448201528660648201526064815260a081018181106001600160401b03821117610623578952516105c2918691829182865af13d1561061b573d906105a582610e3e565b916105b28b519384610df0565b82523d87602084013e5b83611243565b80519081151591826105f3575b50506105dd57508590610367565b85602491885191635274afe760e01b8352820152fd5b819250906020918101031261061757602001518015908115036106175738806105cf565b8480fd5b6060906105bc565b634e487b7160e01b875260418952602487fd5b5082346106805760203660031901126106805760609282913581526008602052206001600160401b0360018201541691600360028301549201549181519384526020840152820152f35b8280fd5b508234610680576020366003190112610680576001600160a01b03813581811693919290849003610617578454928316916106c0833314611040565b84156106fe57505082907fe23b80c73a660924729e3a56cc85a00d5599a0270943d409a14d777d91d675d58580a36001600160a01b03191617815580f35b906020608492519162461bcd60e51b8352820152602160248201527f43434950526f757465724f7074696d697a65643a207a65726f206164647265736044820152607360f81b6064820152fd5b508290346106805760203660031901126106805781359161077660018060a01b038554163314611040565b82156107b457507f19ad72acd40a59cad104f97c7897cc5675e52fe1e2679088c4bfffd96a9d58a7906001548151908152836020820152a160015580f35b6020608492519162461bcd60e51b8352820152602f60248201527f43434950526f757465724f7074696d697a65643a20666565206d757374206265604482
"linkReferences": {},
"deployedLinkReferences": {}
}