UNPKG

@chainlink/contracts

Version:

Chainlink smart contracts

1,148 lines (1,147 loc) 23.3 kB
[ { "inputs": [ { "internalType": "contract IERC20", "name": "token", "type": "address" }, { "internalType": "uint64", "name": "localChainSelector", "type": "uint64" }, { "internalType": "contract ILiquidityContainer", "name": "localLiquidityContainer", "type": "address" }, { "internalType": "uint256", "name": "minimumLiquidity", "type": "uint256" }, { "internalType": "address", "name": "finance", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [ { "internalType": "bytes32", "name": "expected", "type": "bytes32" }, { "internalType": "bytes32", "name": "actual", "type": "bytes32" } ], "name": "ConfigDigestMismatch", "type": "error" }, { "inputs": [], "name": "EmptyReport", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "expected", "type": "uint256" }, { "internalType": "uint256", "name": "actual", "type": "uint256" } ], "name": "ForkedChain", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "requested", "type": "uint256" }, { "internalType": "uint256", "name": "available", "type": "uint256" }, { "internalType": "uint256", "name": "reserve", "type": "uint256" } ], "name": "InsufficientLiquidity", "type": "error" }, { "inputs": [ { "internalType": "string", "name": "message", "type": "string" } ], "name": "InvalidConfig", "type": "error" }, { "inputs": [ { "internalType": "uint64", "name": "chainSelector", "type": "uint64" } ], "name": "InvalidRemoteChain", "type": "error" }, { "inputs": [ { "internalType": "uint64", "name": "sequenceNumber", "type": "uint64" }, { "internalType": "uint64", "name": "latestSequenceNumber", "type": "uint64" } ], "name": "NonIncreasingSequenceNumber", "type": "error" }, { "inputs": [], "name": "NonUniqueSignatures", "type": "error" }, { "inputs": [], "name": "OnlyFinanceRole", "type": "error" }, { "inputs": [], "name": "OracleCannotBeZeroAddress", "type": "error" }, { "inputs": [], "name": "SignaturesOutOfRegistration", "type": "error" }, { "inputs": [], "name": "TransferFailed", "type": "error" }, { "inputs": [], "name": "UnauthorizedSigner", "type": "error" }, { "inputs": [], "name": "UnauthorizedTransmitter", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "expected", "type": "uint256" }, { "internalType": "uint256", "name": "actual", "type": "uint256" } ], "name": "WrongMessageLength", "type": "error" }, { "inputs": [], "name": "WrongNumberOfSignatures", "type": "error" }, { "inputs": [], "name": "ZeroAddress", "type": "error" }, { "inputs": [], "name": "ZeroChainSelector", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint32", "name": "previousConfigBlockNumber", "type": "uint32" }, { "indexed": false, "internalType": "bytes32", "name": "configDigest", "type": "bytes32" }, { "indexed": false, "internalType": "uint64", "name": "configCount", "type": "uint64" }, { "indexed": false, "internalType": "address[]", "name": "signers", "type": "address[]" }, { "indexed": false, "internalType": "address[]", "name": "transmitters", "type": "address[]" }, { "indexed": false, "internalType": "uint8", "name": "f", "type": "uint8" }, { "indexed": false, "internalType": "bytes", "name": "onchainConfig", "type": "bytes" }, { "indexed": false, "internalType": "uint64", "name": "offchainConfigVersion", "type": "uint64" }, { "indexed": false, "internalType": "bytes", "name": "offchainConfig", "type": "bytes" } ], "name": "ConfigSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "remoteChainSelector", "type": "uint64" }, { "indexed": false, "internalType": "contract IBridgeAdapter", "name": "localBridge", "type": "address" }, { "indexed": false, "internalType": "address", "name": "remoteToken", "type": "address" }, { "indexed": false, "internalType": "address", "name": "remoteRebalancer", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "enabled", "type": "bool" } ], "name": "CrossChainRebalancerSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "ocrSeqNum", "type": "uint64" }, { "indexed": true, "internalType": "uint64", "name": "remoteChainSelector", "type": "uint64" }, { "indexed": false, "internalType": "bytes", "name": "bridgeSpecificData", "type": "bytes" }, { "indexed": false, "internalType": "bytes", "name": "reason", "type": "bytes" } ], "name": "FinalizationFailed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "ocrSeqNum", "type": "uint64" }, { "indexed": true, "internalType": "uint64", "name": "remoteChainSelector", "type": "uint64" }, { "indexed": false, "internalType": "bytes", "name": "bridgeSpecificData", "type": "bytes" } ], "name": "FinalizationStepCompleted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "financeRole", "type": "address" } ], "name": "FinanceRoleSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "provider", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LiquidityAddedToContainer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "newLiquidityContainer", "type": "address" } ], "name": "LiquidityContainerSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "remover", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LiquidityRemovedFromContainer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "ocrSeqNum", "type": "uint64" }, { "indexed": true, "internalType": "uint64", "name": "fromChainSelector", "type": "uint64" }, { "indexed": true, "internalType": "uint64", "name": "toChainSelector", "type": "uint64" }, { "indexed": false, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "bytes", "name": "bridgeSpecificData", "type": "bytes" }, { "indexed": false, "internalType": "bytes", "name": "bridgeReturnData", "type": "bytes" } ], "name": "LiquidityTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "oldBalance", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256" } ], "name": "MinimumLiquiditySet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "depositor", "type": "address" } ], "name": "NativeDeposited", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "destination", "type": "address" } ], "name": "NativeWithdrawn", "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": "bytes32", "name": "configDigest", "type": "bytes32" }, { "indexed": false, "internalType": "uint64", "name": "sequenceNumber", "type": "uint64" } ], "name": "Transmitted", "type": "event" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "addLiquidity", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getAllCrossChainRebalancers", "outputs": [ { "components": [ { "internalType": "address", "name": "remoteRebalancer", "type": "address" }, { "internalType": "contract IBridgeAdapter", "name": "localBridge", "type": "address" }, { "internalType": "address", "name": "remoteToken", "type": "address" }, { "internalType": "uint64", "name": "remoteChainSelector", "type": "uint64" }, { "internalType": "bool", "name": "enabled", "type": "bool" } ], "internalType": "struct ILiquidityManager.CrossChainRebalancerArgs[]", "name": "", "type": "tuple[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "chainSelector", "type": "uint64" } ], "name": "getCrossChainRebalancer", "outputs": [ { "components": [ { "internalType": "address", "name": "remoteRebalancer", "type": "address" }, { "internalType": "contract IBridgeAdapter", "name": "localBridge", "type": "address" }, { "internalType": "address", "name": "remoteToken", "type": "address" }, { "internalType": "bool", "name": "enabled", "type": "bool" } ], "internalType": "struct LiquidityManager.CrossChainRebalancer", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getFinanceRole", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getLiquidity", "outputs": [ { "internalType": "uint256", "name": "currentLiquidity", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getLocalLiquidityContainer", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getMinimumLiquidity", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getSupportedDestChains", "outputs": [ { "internalType": "uint64[]", "name": "", "type": "uint64[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getTransmitters", "outputs": [ { "internalType": "address[]", "name": "", "type": "address[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "i_localToken", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "latestConfigDetails", "outputs": [ { "internalType": "uint32", "name": "configCount", "type": "uint32" }, { "internalType": "uint32", "name": "blockNumber", "type": "uint32" }, { "internalType": "bytes32", "name": "configDigest", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "latestSequenceNumber", "outputs": [ { "internalType": "uint64", "name": "sequenceNumber", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "chainSelector", "type": "uint64" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "nativeBridgeFee", "type": "uint256" }, { "internalType": "bytes", "name": "bridgeSpecificPayload", "type": "bytes" } ], "name": "rebalanceLiquidity", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "remoteChainSelector", "type": "uint64" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "bool", "name": "shouldWrapNative", "type": "bool" }, { "internalType": "bytes", "name": "bridgeSpecificPayload", "type": "bytes" } ], "name": "receiveLiquidity", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "removeLiquidity", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "remoteRebalancer", "type": "address" }, { "internalType": "contract IBridgeAdapter", "name": "localBridge", "type": "address" }, { "internalType": "address", "name": "remoteToken", "type": "address" }, { "internalType": "uint64", "name": "remoteChainSelector", "type": "uint64" }, { "internalType": "bool", "name": "enabled", "type": "bool" } ], "internalType": "struct ILiquidityManager.CrossChainRebalancerArgs", "name": "crossChainLiqManager", "type": "tuple" } ], "name": "setCrossChainRebalancer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "remoteRebalancer", "type": "address" }, { "internalType": "contract IBridgeAdapter", "name": "localBridge", "type": "address" }, { "internalType": "address", "name": "remoteToken", "type": "address" }, { "internalType": "uint64", "name": "remoteChainSelector", "type": "uint64" }, { "internalType": "bool", "name": "enabled", "type": "bool" } ], "internalType": "struct ILiquidityManager.CrossChainRebalancerArgs[]", "name": "crossChainRebalancers", "type": "tuple[]" } ], "name": "setCrossChainRebalancers", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "finance", "type": "address" } ], "name": "setFinanceRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract ILiquidityContainer", "name": "localLiquidityContainer", "type": "address" } ], "name": "setLocalLiquidityContainer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "minimumLiquidity", "type": "uint256" } ], "name": "setMinimumLiquidity", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "signers", "type": "address[]" }, { "internalType": "address[]", "name": "transmitters", "type": "address[]" }, { "internalType": "uint8", "name": "f", "type": "uint8" }, { "internalType": "bytes", "name": "onchainConfig", "type": "bytes" }, { "internalType": "uint64", "name": "offchainConfigVersion", "type": "uint64" }, { "internalType": "bytes", "name": "offchainConfig", "type": "bytes" } ], "name": "setOCR3Config", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32[3]", "name": "reportContext", "type": "bytes32[3]" }, { "internalType": "bytes", "name": "report", "type": "bytes" }, { "internalType": "bytes32[]", "name": "rs", "type": "bytes32[]" }, { "internalType": "bytes32[]", "name": "ss", "type": "bytes32[]" }, { "internalType": "bytes32", "name": "rawVs", "type": "bytes32" } ], "name": "transmit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "typeAndVersion", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "destination", "type": "address" } ], "name": "withdrawERC20", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address payable", "name": "destination", "type": "address" } ], "name": "withdrawNative", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "stateMutability": "payable", "type": "receive" } ]