@functionx_io/contracts
Version:
Smart Contract library for Solidity
1,180 lines (1,179 loc) • 26.7 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "IFxBridgeLogic",
"sourceName": "contracts/interfaces/IFxBridgeLogic.sol",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_tokenContract",
"type": "address"
},
{
"indexed": false,
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"indexed": false,
"internalType": "string",
"name": "_symbol",
"type": "string"
},
{
"indexed": false,
"internalType": "uint8",
"name": "_decimals",
"type": "uint8"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_eventNonce",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "_memo",
"type": "bytes32"
}
],
"name": "AddBridgeTokenEvent",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_sender",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_refund",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "_txOrigin",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_eventNonce",
"type": "uint256"
},
{
"indexed": false,
"internalType": "string",
"name": "_dstChain",
"type": "string"
},
{
"indexed": false,
"internalType": "address[]",
"name": "_tokens",
"type": "address[]"
},
{
"indexed": false,
"internalType": "uint256[]",
"name": "_amounts",
"type": "uint256[]"
},
{
"indexed": false,
"internalType": "bytes",
"name": "_data",
"type": "bytes"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_quoteId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_gasLimit",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes",
"name": "_memo",
"type": "bytes"
}
],
"name": "BridgeCallEvent",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "_newOracleSetNonce",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_eventNonce",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address[]",
"name": "_oracles",
"type": "address[]"
},
{
"indexed": false,
"internalType": "uint256[]",
"name": "_powers",
"type": "uint256[]"
}
],
"name": "OracleSetUpdatedEvent",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_tokenContract",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_sender",
"type": "address"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "_destination",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "_targetIBC",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_eventNonce",
"type": "uint256"
}
],
"name": "SendToFxEvent",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_txOrigin",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_nonce",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_eventNonce",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "_success",
"type": "bool"
},
{
"indexed": false,
"internalType": "bytes",
"name": "_cause",
"type": "bytes"
}
],
"name": "SubmitBridgeCallEvent",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "_batchNonce",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "_token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_eventNonce",
"type": "uint256"
}
],
"name": "TransactionBatchExecutedEvent",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "_token",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "TransferOwnerEvent",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "_tokenAddr",
"type": "address"
}
],
"name": "activeBridgeToken",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_tokenAddr",
"type": "address"
},
{
"internalType": "bytes32",
"name": "_memo",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "_isOriginated",
"type": "bool"
}
],
"name": "addBridgeToken",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_dstChain",
"type": "string"
},
{
"internalType": "address",
"name": "_refund",
"type": "address"
},
{
"internalType": "address[]",
"name": "_tokens",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "_amounts",
"type": "uint256[]"
},
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "_quoteId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_gasLimit",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "_memo",
"type": "bytes"
}
],
"name": "bridgeCall",
"outputs": [
{
"internalType": "uint256",
"name": "_eventNonce",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_fxbridgeId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_methodName",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "_nonce",
"type": "uint256"
},
{
"components": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "refund",
"type": "address"
},
{
"internalType": "address[]",
"name": "tokens",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "amounts",
"type": "uint256[]"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "memo",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "timeout",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "gasLimit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "eventNonce",
"type": "uint256"
}
],
"internalType": "struct FxBridgeBase.BridgeCallData",
"name": "_input",
"type": "tuple"
}
],
"name": "bridgeCallCheckpoint",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "bridgeTokens",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_tokenAddr",
"type": "address"
}
],
"name": "checkAssetStatus",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_erc20Address",
"type": "address"
}
],
"name": "convert_decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getBridgeTokenList",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "addr",
"type": "address"
},
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "uint8",
"name": "decimals",
"type": "uint8"
}
],
"internalType": "struct FxBridgeBase.BridgeToken[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_tokenAddr",
"type": "address"
}
],
"name": "getTokenStatus",
"outputs": [
{
"components": [
{
"internalType": "bool",
"name": "isOriginated",
"type": "bool"
},
{
"internalType": "bool",
"name": "isActive",
"type": "bool"
},
{
"internalType": "bool",
"name": "isExist",
"type": "bool"
}
],
"internalType": "struct FxBridgeBase.TokenStatus",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_erc20Address",
"type": "address"
}
],
"name": "lastBatchNonce",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_fxbridgeId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_methodName",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "_oracleSetNonce",
"type": "uint256"
},
{
"internalType": "address[]",
"name": "_oracles",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "_powers",
"type": "uint256[]"
}
],
"name": "oracleSetCheckpoint",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "pause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_tokenAddr",
"type": "address"
}
],
"name": "pauseBridgeToken",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_tokenContract",
"type": "address"
},
{
"internalType": "bytes32",
"name": "_destination",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_targetIBC",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "sendToFx",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "state_fxBridgeId",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_erc20Address",
"type": "address"
}
],
"name": "state_lastBatchNonces",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "state_lastBridgeCallNonces",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "state_lastEventNonce",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "state_lastOracleSetCheckpoint",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "state_lastOracleSetNonce",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "state_powerThreshold",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "_currentOracles",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "_currentPowers",
"type": "uint256[]"
},
{
"internalType": "uint8[]",
"name": "_v",
"type": "uint8[]"
},
{
"internalType": "bytes32[]",
"name": "_r",
"type": "bytes32[]"
},
{
"internalType": "bytes32[]",
"name": "_s",
"type": "bytes32[]"
},
{
"internalType": "uint256[]",
"name": "_amounts",
"type": "uint256[]"
},
{
"internalType": "address[]",
"name": "_destinations",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "_fees",
"type": "uint256[]"
},
{
"internalType": "uint256[2]",
"name": "_nonceArray",
"type": "uint256[2]"
},
{
"internalType": "address",
"name": "_tokenContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "_batchTimeout",
"type": "uint256"
},
{
"internalType": "address",
"name": "_feeReceive",
"type": "address"
}
],
"name": "submitBatch",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_fxbridgeId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_methodName",
"type": "bytes32"
},
{
"internalType": "uint256[]",
"name": "_amounts",
"type": "uint256[]"
},
{
"internalType": "address[]",
"name": "_destinations",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "_fees",
"type": "uint256[]"
},
{
"internalType": "uint256",
"name": "_batchNonce",
"type": "uint256"
},
{
"internalType": "address",
"name": "_tokenContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "_batchTimeout",
"type": "uint256"
},
{
"internalType": "address",
"name": "_feeReceive",
"type": "address"
}
],
"name": "submitBatchCheckpoint",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address[]",
"name": "oracles",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "powers",
"type": "uint256[]"
},
{
"internalType": "bytes32[]",
"name": "r",
"type": "bytes32[]"
},
{
"internalType": "bytes32[]",
"name": "s",
"type": "bytes32[]"
},
{
"internalType": "uint8[]",
"name": "v",
"type": "uint8[]"
}
],
"internalType": "struct FxBridgeBase.OracleSignatures",
"name": "_curOracleSigns",
"type": "tuple"
},
{
"internalType": "uint256[2]",
"name": "_nonceArray",
"type": "uint256[2]"
},
{
"components": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "refund",
"type": "address"
},
{
"internalType": "address[]",
"name": "tokens",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "amounts",
"type": "uint256[]"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "memo",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "timeout",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "gasLimit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "eventNonce",
"type": "uint256"
}
],
"internalType": "struct FxBridgeBase.BridgeCallData",
"name": "_input",
"type": "tuple"
}
],
"name": "submitBridgeCall",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_tokenAddr",
"type": "address"
}
],
"name": "tokenStatus",
"outputs": [
{
"internalType": "bool",
"name": "isOriginated",
"type": "bool"
},
{
"internalType": "bool",
"name": "isActive",
"type": "bool"
},
{
"internalType": "bool",
"name": "isExist",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_token",
"type": "address"
},
{
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwner",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "unpause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "_newOracles",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "_newPowers",
"type": "uint256[]"
},
{
"internalType": "uint256",
"name": "_newOracleSetNonce",
"type": "uint256"
},
{
"internalType": "address[]",
"name": "_currentOracles",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "_currentPowers",
"type": "uint256[]"
},
{
"internalType": "uint256",
"name": "_currentOracleSetNonce",
"type": "uint256"
},
{
"internalType": "uint8[]",
"name": "_v",
"type": "uint8[]"
},
{
"internalType": "bytes32[]",
"name": "_r",
"type": "bytes32[]"
},
{
"internalType": "bytes32[]",
"name": "_s",
"type": "bytes32[]"
}
],
"name": "updateOracleSet",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}