1730 lines
33 KiB
JSON
1730 lines
33 KiB
JSON
[
|
|
{
|
|
"inputs": [],
|
|
"name": "AmountIsZero",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "caller",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "CallerNotBaseCurrency",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "CallerNotOperator",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "msgValue",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "InvalidAmount",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "InvalidCurrency",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "InvalidFullLiquidationThresholdRate",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "InvalidLiquidationProtocolFeeRate",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "InvalidLiquidationThresholdRate",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "InvalidLiquidatorFeeRate",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "InvalidToken",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "MarketTerminated",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "string",
|
|
"name": "name",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"name": "MissingAddress",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "role",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "account",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "NotAllowedAccess",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "string",
|
|
"name": "name",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"name": "OnlyAcceptedContract",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "RedemptionIsRequired",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "ResolverAlreadyRegistered",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "UnregisteredCurrency",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "bytes32",
|
|
"name": "name",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "address",
|
|
"name": "destination",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "CacheUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "bytes32",
|
|
"name": "ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "address",
|
|
"name": "tokenAddress",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "bool",
|
|
"name": "isCollateral",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"name": "CurrencyRegistered",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "bytes32",
|
|
"name": "ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "bool",
|
|
"name": "isCollateral",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"name": "CurrencyUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "bytes32",
|
|
"name": "ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "address",
|
|
"name": "caller",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "Deposit",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "previousRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "ratio",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "FullLiquidationThresholdRateUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint8",
|
|
"name": "version",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"name": "Initialized",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "previousRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "ratio",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "LiquidationProtocolFeeRateUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "previousRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "ratio",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "LiquidationThresholdRateUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "previousRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "ratio",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "LiquidatorFeeRateUpdated",
|
|
"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": false,
|
|
"internalType": "address",
|
|
"name": "account",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "Paused",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes32",
|
|
"name": "role",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes32",
|
|
"name": "previousAdminRole",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes32",
|
|
"name": "newAdminRole",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "RoleAdminChanged",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes32",
|
|
"name": "role",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "account",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "sender",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "RoleGranted",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes32",
|
|
"name": "role",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "account",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "sender",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "RoleRevoked",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes32",
|
|
"name": "ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Transfer",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "address",
|
|
"name": "account",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "Unpaused",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "bytes32",
|
|
"name": "ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Withdraw",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "DEFAULT_ADMIN_ROLE",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "OPERATOR_ROLE",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "addDepositAmount",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "admin",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "addOperator",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "buildCache",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "workingLendOrdersAmount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "claimableAmount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "workingBorrowOrdersAmount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "debtAmount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "lentAmount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "borrowedAmount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct ILendingMarketController.AdditionalFunds",
|
|
"name": "_additionalFunds",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"name": "calculateCoverage",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "coverage",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "bool",
|
|
"name": "isInsufficientDepositAmount",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "calculateLiquidationFees",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "protocolFee",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "liquidatorFee",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "cleanUpUsedCurrencies",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "deposit",
|
|
"outputs": [],
|
|
"stateMutability": "payable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "depositFrom",
|
|
"outputs": [],
|
|
"stateMutability": "payable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_amount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "_onBehalfOf",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "depositTo",
|
|
"outputs": [],
|
|
"stateMutability": "payable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_amount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_deadline",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "_permitV",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_permitR",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_permitS",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "depositWithPermitFrom",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_amount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "_onBehalfOf",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_deadline",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "_permitV",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_permitR",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_permitS",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "depositWithPermitTo",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "executeForcedReset",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "getBorrowableAmount",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "getCollateralAmount",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getCollateralCurrencies",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32[]",
|
|
"name": "",
|
|
"type": "bytes32[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getCollateralDetail",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "totalCollateral",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "totalUsedCollateral",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "totalDeposit",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getCoverage",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "getDepositAmount",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_liquidationCcy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_liquidationAmountMaximum",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "getLiquidationAmount",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "liquidationAmount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "protocolFee",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "liquidatorFee",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getLiquidationConfiguration",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "liquidationThresholdRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "fullLiquidationThresholdRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "liquidationProtocolFeeRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "liquidatorFeeRate",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getLiquidationThresholdRate",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "rate",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getRevision",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "role",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "getRoleAdmin",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "getTokenAddress",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getTotalCollateralAmount",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "totalCollateralAmount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "getTotalDepositAmount",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getTotalUnusedCollateralAmount",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getUsedCurrencies",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32[]",
|
|
"name": "",
|
|
"type": "bytes32[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getWithdrawableCollateral",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getWithdrawableCollateral",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "role",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "account",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "grantRole",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "role",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "account",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "hasRole",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "_resolver",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_liquidationThresholdRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_fullLiquidationThresholdRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_liquidationProtocolFeeRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_liquidatorFeeRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "_nativeToken",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "initialize",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32[]",
|
|
"name": "_ccys",
|
|
"type": "bytes32[]"
|
|
}
|
|
],
|
|
"name": "isCollateral",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool[]",
|
|
"name": "isCollateralCurrencies",
|
|
"type": "bool[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "isCollateral",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_orderCcy",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "isCovered",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "isEnoughCollateral",
|
|
"type": "bool"
|
|
},
|
|
{
|
|
"internalType": "bool",
|
|
"name": "isEnoughDepositInOrderCcy",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "isRegisteredCurrency",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "isResolverCached",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes[]",
|
|
"name": "data",
|
|
"type": "bytes[]"
|
|
}
|
|
],
|
|
"name": "multicall",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes[]",
|
|
"name": "results",
|
|
"type": "bytes[]"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "owner",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "pause",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "paused",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "_tokenAddress",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bool",
|
|
"name": "_isCollateral",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"name": "registerCurrency",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "removeDepositAmount",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "admin",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "removeOperator",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "renounceOwnership",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "role",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "account",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "renounceRole",
|
|
"outputs": [],
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "requiredContracts",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32[]",
|
|
"name": "contracts",
|
|
"type": "bytes32[]"
|
|
}
|
|
],
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "resolver",
|
|
"outputs": [
|
|
{
|
|
"internalType": "contract IAddressResolver",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "role",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "account",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "revokeRole",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "interfaceId",
|
|
"type": "bytes4"
|
|
}
|
|
],
|
|
"name": "supportsInterface",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "_to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "transferFrom",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "untransferredAmount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "newOwner",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "transferOwnership",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "unpause",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "bool",
|
|
"name": "_isCollateral",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"name": "updateCurrency",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_liquidationThresholdRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_fullLiquidationThresholdRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_liquidationProtocolFeeRate",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_liquidatorFeeRate",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "updateLiquidationConfiguration",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "_ccy",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "withdraw",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"stateMutability": "payable",
|
|
"type": "receive"
|
|
}
|
|
] |