@bronlabs/intents-sdk
Version:
SDK for Intents DeFi smart contracts
910 lines (909 loc) • 17.6 kB
JSON
[
{
"inputs": [],
"name": "InvalidInitialization",
"type": "error"
},
{
"inputs": [],
"name": "NotInitializing",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "OwnableInvalidOwner",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "OwnableUnauthorizedAccount",
"type": "error"
},
{
"inputs": [],
"name": "ReentrancyGuardReentrantCall",
"type": "error"
},
{
"inputs": [],
"name": "SR_INVALID_INSURANCE_TOKEN",
"type": "error"
},
{
"inputs": [],
"name": "SR_INVALID_PARAMS",
"type": "error"
},
{
"inputs": [],
"name": "SR_INVALID_PRICE",
"type": "error"
},
{
"inputs": [],
"name": "SR_NOT_ENOUGH_OPERATION_AMOUNT",
"type": "error"
},
{
"inputs": [],
"name": "SR_NO_FEE",
"type": "error"
},
{
"inputs": [],
"name": "SR_ONLY_ORDER_ENGINE",
"type": "error"
},
{
"inputs": [],
"name": "SR_ONLY_SOLVER_OR_OWNER",
"type": "error"
},
{
"inputs": [],
"name": "SR_ORACLE_CALL_FAILED",
"type": "error"
},
{
"inputs": [],
"name": "SR_SOLVER_ALREADY_REGISTERED",
"type": "error"
},
{
"inputs": [],
"name": "SR_SOLVER_DEACTIVATION_NOT_ALLOWED",
"type": "error"
},
{
"inputs": [],
"name": "SR_SOLVER_HAS_OPERATION",
"type": "error"
},
{
"inputs": [],
"name": "SR_SOLVER_NOT_ACTIVE",
"type": "error"
},
{
"inputs": [],
"name": "SR_SOLVER_NOT_PENDING",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "SafeERC20FailedOperation",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "tokenAddress",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "FeeAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "tokenAddress",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "FeeWithdrawn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint64",
"name": "version",
"type": "uint64"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "tokenAddress",
"type": "address"
},
{
"indexed": true,
"internalType": "bool",
"name": "isAvailable",
"type": "bool"
},
{
"indexed": false,
"internalType": "uint256",
"name": "haircut",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "liquidationPremium",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "oracle",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes",
"name": "oracleCallData",
"type": "bytes"
},
{
"indexed": false,
"internalType": "uint8",
"name": "priceDecimals",
"type": "uint8"
}
],
"name": "InsuranceTokenParamsSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "orderEngine",
"type": "address"
}
],
"name": "OrderEngineUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "solver",
"type": "address"
}
],
"name": "SolverDeactivationCompleted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "solver",
"type": "address"
}
],
"name": "SolverDeactivationInitiated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "solver",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "SolverInsuranceAmountAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "solver",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "SolverOperationAmountAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "solver",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "SolverOperationAmountDecreased",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "solver",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "insuranceTokenAddress",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "insuranceAmount",
"type": "uint256"
}
],
"name": "SolverRegistered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "solver",
"type": "address"
}
],
"name": "SolverRemoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "solver",
"type": "address"
},
{
"indexed": true,
"internalType": "bool",
"name": "isAccepted",
"type": "bool"
}
],
"name": "SolverResponse",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "solver",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "SolverSlashed",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "addSolverInsuranceAmount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_solver",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "addSolverOperationAmount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_solver",
"type": "address"
}
],
"name": "deactivateSolverComplete",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_solver",
"type": "address"
}
],
"name": "deactivateSolverInit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_solver",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
},
{
"internalType": "bool",
"name": "_withFee",
"type": "bool"
}
],
"name": "decreaseSolverOperationAmount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_solver",
"type": "address"
}
],
"name": "getSolverAvailableOperationAmount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_solver",
"type": "address"
}
],
"name": "getSolverStatus",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalSolversCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_orderEngine",
"type": "address"
},
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "insuranceTokens",
"outputs": [
{
"internalType": "bool",
"name": "isAvailable",
"type": "bool"
},
{
"internalType": "uint256",
"name": "haircut",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "liquidationPremium",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"internalType": "address",
"name": "oracle",
"type": "address"
},
{
"internalType": "bytes",
"name": "oracleCallData",
"type": "bytes"
},
{
"internalType": "uint8",
"name": "priceDecimals",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "decimals",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "collectedFees",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_solver",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "_receiver",
"type": "address"
},
{
"internalType": "bool",
"name": "_isOperationAmount",
"type": "bool"
}
],
"name": "manualSlashSolver",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "orderEngine",
"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": "address",
"name": "_insuranceTokenAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "_insuranceAmount",
"type": "uint256"
}
],
"name": "registerSolver",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_solver",
"type": "address"
},
{
"internalType": "bool",
"name": "_isAccepted",
"type": "bool"
}
],
"name": "registerSolverResponse",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_solver",
"type": "address"
}
],
"name": "removeSolver",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_tokenAddress",
"type": "address"
},
{
"internalType": "bool",
"name": "_isAvailable",
"type": "bool"
},
{
"internalType": "uint256",
"name": "_haircut",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_liquidationPremium",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_fee",
"type": "uint256"
},
{
"internalType": "address",
"name": "_oracle",
"type": "address"
},
{
"internalType": "bytes",
"name": "_oracleCallData",
"type": "bytes"
},
{
"internalType": "uint8",
"name": "_priceDecimals",
"type": "uint8"
}
],
"name": "setInsuranceTokenParams",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_orderEngine",
"type": "address"
}
],
"name": "setOrderEngine",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_solver",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "_receiver",
"type": "address"
}
],
"name": "slashSolver",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "solvers",
"outputs": [
{
"internalType": "enum ISolverRegister.SolverStatus",
"name": "status",
"type": "uint8"
},
{
"internalType": "address",
"name": "insuranceTokenAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "insuranceAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "operationAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deactivationInitiatedAt",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "solversCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_tokenAddress",
"type": "address"
},
{
"internalType": "address",
"name": "_receiver",
"type": "address"
}
],
"name": "withdrawFee",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]