@orionprotocol/contracts
Version:
Orion Protocol contracts typings
843 lines (842 loc) • 27.1 kB
JavaScript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, utils } from "ethers";
const _abi = [
{
inputs: [],
name: "CHAIN_ID",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "CROSS_CHAIN_ORDER_TYPEHASH",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "DOMAIN_NAME",
outputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "DOMAIN_SALT",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "DOMAIN_SEPARATOR",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "DOMAIN_VERSION",
outputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "EIP712_DOMAIN_TYPEHASH",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "LOCK_ORDER_TYPEHASH",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "ORDER_TYPEHASH",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
components: [
{
components: [
{
internalType: "address",
name: "senderAddress",
type: "address",
},
{
internalType: "address",
name: "matcherAddress",
type: "address",
},
{
internalType: "address",
name: "baseAsset",
type: "address",
},
{
internalType: "address",
name: "quoteAsset",
type: "address",
},
{
internalType: "address",
name: "matcherFeeAsset",
type: "address",
},
{
internalType: "uint64",
name: "amount",
type: "uint64",
},
{
internalType: "uint64",
name: "price",
type: "uint64",
},
{
internalType: "uint64",
name: "matcherFee",
type: "uint64",
},
{
internalType: "uint64",
name: "nonce",
type: "uint64",
},
{
internalType: "uint64",
name: "expiration",
type: "uint64",
},
{
internalType: "uint8",
name: "buySide",
type: "uint8",
},
{
internalType: "bytes",
name: "signature",
type: "bytes",
},
],
internalType: "struct LibValidator.Order",
name: "limitOrder",
type: "tuple",
},
{
internalType: "uint24",
name: "targetChainId",
type: "uint24",
},
{
internalType: "bytes32",
name: "secretHash",
type: "bytes32",
},
{
internalType: "uint64",
name: "lockOrderExpiration",
type: "uint64",
},
],
internalType: "struct LibValidator.CrossChainOrder",
name: "crossChainOrder",
type: "tuple",
},
{
components: [
{
internalType: "address",
name: "senderAddress",
type: "address",
},
{
internalType: "address",
name: "matcherAddress",
type: "address",
},
{
internalType: "address",
name: "baseAsset",
type: "address",
},
{
internalType: "address",
name: "quoteAsset",
type: "address",
},
{
internalType: "address",
name: "matcherFeeAsset",
type: "address",
},
{
internalType: "uint64",
name: "amount",
type: "uint64",
},
{
internalType: "uint64",
name: "price",
type: "uint64",
},
{
internalType: "uint64",
name: "matcherFee",
type: "uint64",
},
{
internalType: "uint64",
name: "nonce",
type: "uint64",
},
{
internalType: "uint64",
name: "expiration",
type: "uint64",
},
{
internalType: "uint8",
name: "buySide",
type: "uint8",
},
{
internalType: "bytes",
name: "signature",
type: "bytes",
},
],
internalType: "struct LibValidator.Order",
name: "brokerOrder",
type: "tuple",
},
{
internalType: "address",
name: "sender",
type: "address",
},
{
internalType: "uint256",
name: "filledAmount",
type: "uint256",
},
{
internalType: "uint256",
name: "filledPrice",
type: "uint256",
},
{
internalType: "uint256",
name: "currentTime",
type: "uint256",
},
{
internalType: "address",
name: "allowedMatcher",
type: "address",
},
],
name: "checkCrossChainOrdersInfo",
outputs: [
{
internalType: "bytes32",
name: "crossChainOrderHash",
type: "bytes32",
},
{
internalType: "bytes32",
name: "brokerOrderHash",
type: "bytes32",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [
{
components: [
{
internalType: "address",
name: "senderAddress",
type: "address",
},
{
internalType: "address",
name: "matcherAddress",
type: "address",
},
{
internalType: "address",
name: "baseAsset",
type: "address",
},
{
internalType: "address",
name: "quoteAsset",
type: "address",
},
{
internalType: "address",
name: "matcherFeeAsset",
type: "address",
},
{
internalType: "uint64",
name: "amount",
type: "uint64",
},
{
internalType: "uint64",
name: "price",
type: "uint64",
},
{
internalType: "uint64",
name: "matcherFee",
type: "uint64",
},
{
internalType: "uint64",
name: "nonce",
type: "uint64",
},
{
internalType: "uint64",
name: "expiration",
type: "uint64",
},
{
internalType: "uint8",
name: "buySide",
type: "uint8",
},
{
internalType: "bytes",
name: "signature",
type: "bytes",
},
],
internalType: "struct LibValidator.Order",
name: "buyOrder",
type: "tuple",
},
{
components: [
{
internalType: "address",
name: "senderAddress",
type: "address",
},
{
internalType: "address",
name: "matcherAddress",
type: "address",
},
{
internalType: "address",
name: "baseAsset",
type: "address",
},
{
internalType: "address",
name: "quoteAsset",
type: "address",
},
{
internalType: "address",
name: "matcherFeeAsset",
type: "address",
},
{
internalType: "uint64",
name: "amount",
type: "uint64",
},
{
internalType: "uint64",
name: "price",
type: "uint64",
},
{
internalType: "uint64",
name: "matcherFee",
type: "uint64",
},
{
internalType: "uint64",
name: "nonce",
type: "uint64",
},
{
internalType: "uint64",
name: "expiration",
type: "uint64",
},
{
internalType: "uint8",
name: "buySide",
type: "uint8",
},
{
internalType: "bytes",
name: "signature",
type: "bytes",
},
],
internalType: "struct LibValidator.Order",
name: "sellOrder",
type: "tuple",
},
{
internalType: "address",
name: "sender",
type: "address",
},
{
internalType: "uint256",
name: "filledAmount",
type: "uint256",
},
{
internalType: "uint256",
name: "filledPrice",
type: "uint256",
},
{
internalType: "uint256",
name: "currentTime",
type: "uint256",
},
{
internalType: "address",
name: "allowedMatcher",
type: "address",
},
],
name: "checkOrdersInfo",
outputs: [
{
internalType: "bytes32",
name: "buyOrderHash",
type: "bytes32",
},
{
internalType: "bytes32",
name: "sellOrderHash",
type: "bytes32",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [
{
components: [
{
internalType: "address",
name: "senderAddress",
type: "address",
},
{
internalType: "address",
name: "matcherAddress",
type: "address",
},
{
internalType: "address",
name: "baseAsset",
type: "address",
},
{
internalType: "address",
name: "quoteAsset",
type: "address",
},
{
internalType: "address",
name: "matcherFeeAsset",
type: "address",
},
{
internalType: "uint64",
name: "amount",
type: "uint64",
},
{
internalType: "uint64",
name: "price",
type: "uint64",
},
{
internalType: "uint64",
name: "matcherFee",
type: "uint64",
},
{
internalType: "uint64",
name: "nonce",
type: "uint64",
},
{
internalType: "uint64",
name: "expiration",
type: "uint64",
},
{
internalType: "uint8",
name: "buySide",
type: "uint8",
},
{
internalType: "bytes",
name: "signature",
type: "bytes",
},
],
internalType: "struct LibValidator.Order",
name: "_order",
type: "tuple",
},
],
name: "getEthSignedOrderHash",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [
{
components: [
{
components: [
{
internalType: "address",
name: "senderAddress",
type: "address",
},
{
internalType: "address",
name: "matcherAddress",
type: "address",
},
{
internalType: "address",
name: "baseAsset",
type: "address",
},
{
internalType: "address",
name: "quoteAsset",
type: "address",
},
{
internalType: "address",
name: "matcherFeeAsset",
type: "address",
},
{
internalType: "uint64",
name: "amount",
type: "uint64",
},
{
internalType: "uint64",
name: "price",
type: "uint64",
},
{
internalType: "uint64",
name: "matcherFee",
type: "uint64",
},
{
internalType: "uint64",
name: "nonce",
type: "uint64",
},
{
internalType: "uint64",
name: "expiration",
type: "uint64",
},
{
internalType: "uint8",
name: "buySide",
type: "uint8",
},
{
internalType: "bytes",
name: "signature",
type: "bytes",
},
],
internalType: "struct LibValidator.Order",
name: "limitOrder",
type: "tuple",
},
{
internalType: "uint24",
name: "targetChainId",
type: "uint24",
},
{
internalType: "bytes32",
name: "secretHash",
type: "bytes32",
},
{
internalType: "uint64",
name: "lockOrderExpiration",
type: "uint64",
},
],
internalType: "struct LibValidator.CrossChainOrder",
name: "crossChainOrder",
type: "tuple",
},
],
name: "validateCrossChainOrder",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [
{
components: [
{
internalType: "address",
name: "sender",
type: "address",
},
{
internalType: "uint64",
name: "expiration",
type: "uint64",
},
{
internalType: "address",
name: "asset",
type: "address",
},
{
internalType: "uint64",
name: "amount",
type: "uint64",
},
{
internalType: "uint24",
name: "targetChainId",
type: "uint24",
},
{
internalType: "bytes32",
name: "secretHash",
type: "bytes32",
},
{
internalType: "bytes",
name: "signature",
type: "bytes",
},
],
internalType: "struct LibValidator.LockOrder",
name: "lockOrder",
type: "tuple",
},
],
name: "validateLockOrder",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [
{
components: [
{
internalType: "address",
name: "senderAddress",
type: "address",
},
{
internalType: "address",
name: "matcherAddress",
type: "address",
},
{
internalType: "address",
name: "baseAsset",
type: "address",
},
{
internalType: "address",
name: "quoteAsset",
type: "address",
},
{
internalType: "address",
name: "matcherFeeAsset",
type: "address",
},
{
internalType: "uint64",
name: "amount",
type: "uint64",
},
{
internalType: "uint64",
name: "price",
type: "uint64",
},
{
internalType: "uint64",
name: "matcherFee",
type: "uint64",
},
{
internalType: "uint64",
name: "nonce",
type: "uint64",
},
{
internalType: "uint64",
name: "expiration",
type: "uint64",
},
{
internalType: "uint8",
name: "buySide",
type: "uint8",
},
{
internalType: "bytes",
name: "signature",
type: "bytes",
},
],
internalType: "struct LibValidator.Order",
name: "order",
type: "tuple",
},
],
name: "validateV3",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "pure",
type: "function",
},
];
class LibValidator__factory {
static createInterface() {
return new utils.Interface(_abi);
}
static connect(address, signerOrProvider) {
return new Contract(address, _abi, signerOrProvider);
}
}
LibValidator__factory.abi = _abi;
export { LibValidator__factory };