1103 lines
55 KiB
JSON
1103 lines
55 KiB
JSON
|
|
{
|
||
|
|
"_format": "hh-sol-artifact-1",
|
||
|
|
"contractName": "ReserveSystem",
|
||
|
|
"sourceName": "contracts/reserve/ReserveSystem.sol",
|
||
|
|
"abi": [
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "admin",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "nonpayable",
|
||
|
|
"type": "constructor"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "AccessControlBadConfirmation",
|
||
|
|
"type": "error"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "account",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "neededRole",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "AccessControlUnauthorizedAccount",
|
||
|
|
"type": "error"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "target",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "AddressEmptyCode",
|
||
|
|
"type": "error"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "account",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "AddressInsufficientBalance",
|
||
|
|
"type": "error"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "FailedInnerCall",
|
||
|
|
"type": "error"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "ReentrancyGuardReentrantCall",
|
||
|
|
"type": "error"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "token",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "SafeERC20FailedOperation",
|
||
|
|
"type": "error"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"anonymous": false,
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "sourceAsset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "targetAsset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": false,
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "sourceAmount",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": false,
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "targetAmount",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "conversionId",
|
||
|
|
"type": "bytes32"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": false,
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "fees",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "ConversionExecuted",
|
||
|
|
"type": "event"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"anonymous": false,
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": false,
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "price",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": false,
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "timestamp",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "PriceFeedUpdated",
|
||
|
|
"type": "event"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"anonymous": false,
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": false,
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "amount",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "recipient",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "redemptionId",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "RedemptionExecuted",
|
||
|
|
"type": "event"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"anonymous": false,
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": false,
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "amount",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "depositor",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "reserveId",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "ReserveDeposited",
|
||
|
|
"type": "event"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"anonymous": false,
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": false,
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "amount",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "recipient",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"indexed": true,
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "reserveId",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "ReserveWithdrawn",
|
||
|
|
"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"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "BASE_FEE_BPS",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "CONVERSION_OPERATOR_ROLE",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "DEFAULT_ADMIN_ROLE",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "LARGE_TRANSACTION_FEE_BPS",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "LARGE_TRANSACTION_THRESHOLD",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "MAX_SLIPPAGE_BPS",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "PRICE_FEED_ROLE",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "PRICE_STALENESS_THRESHOLD",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "RESERVE_MANAGER_ROLE",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "SLIPPAGE_FEE_BPS",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "bool",
|
||
|
|
"name": "isLiquid",
|
||
|
|
"type": "bool"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "addSupportedAsset",
|
||
|
|
"outputs": [],
|
||
|
|
"stateMutability": "nonpayable",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "sourceAsset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "targetAsset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "amount",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "calculateConversion",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "targetAmount",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "fees",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "address[]",
|
||
|
|
"name": "path",
|
||
|
|
"type": "address[]"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "conversionIds",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "conversions",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "sourceAsset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "targetAsset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "sourceAmount",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "targetAmount",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "fees",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "timestamp",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "sourceAsset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "targetAsset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "amount",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "convertAssets",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "conversionId",
|
||
|
|
"type": "bytes32"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "targetAmount",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "fees",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "nonpayable",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "amount",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "depositReserve",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "reserveId",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "nonpayable",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "sourceAsset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "targetAsset",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "getConversionPrice",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "getPrice",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "price",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "timestamp",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "getReserveBalance",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "reserveId",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "getReserveById",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "balance",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "role",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "getRoleAdmin",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [],
|
||
|
|
"name": "getSupportedAssets",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address[]",
|
||
|
|
"name": "",
|
||
|
|
"type": "address[]"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"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": "",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "isLiquidAsset",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bool",
|
||
|
|
"name": "",
|
||
|
|
"type": "bool"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "isSupportedAsset",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bool",
|
||
|
|
"name": "",
|
||
|
|
"type": "bool"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "priceFeeds",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "price",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "timestamp",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "bool",
|
||
|
|
"name": "isValid",
|
||
|
|
"type": "bool"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "amount",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "recipient",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "redeem",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "redemptionId",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "nonpayable",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "removeSupportedAsset",
|
||
|
|
"outputs": [],
|
||
|
|
"stateMutability": "nonpayable",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "role",
|
||
|
|
"type": "bytes32"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "callerConfirmation",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "renounceRole",
|
||
|
|
"outputs": [],
|
||
|
|
"stateMutability": "nonpayable",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "reserveBalances",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "reserveIds",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "reserves",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "balance",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "lastUpdated",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"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": "uint256",
|
||
|
|
"name": "",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "supportedAssets",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes4",
|
||
|
|
"name": "interfaceId",
|
||
|
|
"type": "bytes4"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "supportsInterface",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bool",
|
||
|
|
"name": "",
|
||
|
|
"type": "bool"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "view",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "price",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "timestamp",
|
||
|
|
"type": "uint256"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "updatePriceFeed",
|
||
|
|
"outputs": [],
|
||
|
|
"stateMutability": "nonpayable",
|
||
|
|
"type": "function"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"inputs": [
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "asset",
|
||
|
|
"type": "address"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "uint256",
|
||
|
|
"name": "amount",
|
||
|
|
"type": "uint256"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"internalType": "address",
|
||
|
|
"name": "recipient",
|
||
|
|
"type": "address"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "withdrawReserve",
|
||
|
|
"outputs": [
|
||
|
|
{
|
||
|
|
"internalType": "bytes32",
|
||
|
|
"name": "reserveId",
|
||
|
|
"type": "bytes32"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"stateMutability": "nonpayable",
|
||
|
|
"type": "function"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"bytecode": "0x6080346200009857601f6200224838819003918201601f19168301916001600160401b038311848410176200009d578084926020946040528339810103126200009857516001600160a01b038116810362000098576200008790600180556200006881620000b3565b50620000748162000133565b506200008081620001d5565b5062000272565b50604051611f189081620003108239f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b031660008181527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604081205490919060ff166200012f57818052816020526040822081835260205260408220600160ff198254161790553391600080516020620022288339815191528180a4600190565b5090565b6001600160a01b031660008181527fd366d1016677454f50e3558699950248ecb35813183c5b59022a7723e84956c660205260408120549091907fcc938097bd07c9f1619d5e95c26b457140e80b889795c7c1cbd51a28005e02ac9060ff16620001d057808352826020526040832082845260205260408320600160ff1982541617905560008051602062002228833981519152339380a4600190565b505090565b6001600160a01b031660008181527f66dcfc97608f9f18f8688baac638322c3e7e7a48547e291cc7a0517cf1eb3f0560205260408120549091907fda2b0f370bd2974923a71e73c465a6368d3708f6b738cc46b9a1ac650e1de0109060ff16620001d057808352826020526040832082845260205260408320600160ff1982541617905560008051602062002228833981519152339380a4600190565b6001600160a01b031660008181527f63c67d7a1203ec769008e0b4eb0f3b80d118a27fe8671c3cb7b07bf5f05fe6bd60205260408120549091907f933de1eea1e506159851d6a102568bb76240c15db448b4736be6fc8d8ce380a29060ff16620001d057808352826020526040832082845260205260408320600160ff1982541617905560008051602062002228833981519152339380a460019056fe608060408181526004918236101561001657600080fd5b600092833560e01c918262bbf1e4146113ce5750816301ffc9a7146113785781630d013755146107b357816314177107146111a2578163143b2deb1461116757816315226b5414610cd85781631c46bc6f146111275781631d8d7c66146110335781632013b1ce14610fe6578163248a9ca314610fbc5781632f2ff15d14610f9257816336568abe14610f4c57816341976e0914610f1c5781634cd452ba14610ee15781635c833bfd14610dd457816366b51da514610d985781636f60c96414610d2c57816379aa23ad14610d105781637e2fb9f414610cd857816381693d2714610cb3578163892b4f0814610ab15781638d169f4214610a6357816391d1485414610a1d5781639be918e6146109df5781639dcb511a1461098a578163a1547d1114610911578163a217fddf146108f6578163c5f87257146108bb578163c68dbb3714610864578163d547741f14610825578163deb06d4d146107b8578163e229cd76146107b3578163e23a6a2514610714578163e5406dbf146106df578163e88791db146106c3578163ed8b742b1461022157508063f25b9caa146102065763f84ef0f5146101c657600080fd5b346102025760203660031901126102025760209160ff9082906001600160a01b036101ef611434565b168152600a855220541690519015158152f35b5080fd5b503461020257816003193601126102025760209051601e8152f35b8284346106c05761023136611494565b7f933de1eea1e506159851d6a102568bb76240c15db448b4736be6fc8d8ce380a294929490818552602091858352848620338752835260ff8587205416156106a2575061027c611bba565b6001600160a01b0390868216906102948215156117df565b828516926102a384151561182a565b6102ae82151561166c565b8288526009855260ff87892054161561064f578388526009855260ff8789205416156105fc576102df82878b611895565b9099919786835260028852888a842054106105a65761030085303389611d11565b85835260028852898320610315868254611a5a565b90558683526002885289832061032c8a8254611710565b9055610339893389611bdd565b6008548560488c519e8f908c8201956001600160601b0319809260601b16875260601b16603482015201528c60684291015260888d015260888c5260c08c019167ffffffffffffffff918d84108385111761059357838c528d5190209c6101a081018481108482111761057f578f908f8f918f8f928f918f928f908f95938f948f9d9c9b8f946007956101809388525260e0810197885261010081019889526101208101998a5261014081019a8b5261016081019c8d52019c8d42905252528b209951166001600160601b0360a01b90818b5416178a558b60018b0192511690825416179055516002880155516003870155519085015560058401905195865192831161057f57600160401b9687841161056a578b908354858555808610610542575b50019186528a862090865b84811061052e575050505050600690519101556008549182101561051b5760018201806008558210156105085760609a5089949392857f0e1e1a1d3b4eef7481e00a3e7282f9d2f96279566fc476c86bb408a11042bec59360088e94527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301
|
||
|
|
"deployedBytecode": "0x608060408181526004918236101561001657600080fd5b600092833560e01c918262bbf1e4146113ce5750816301ffc9a7146113785781630d013755146107b357816314177107146111a2578163143b2deb1461116757816315226b5414610cd85781631c46bc6f146111275781631d8d7c66146110335781632013b1ce14610fe6578163248a9ca314610fbc5781632f2ff15d14610f9257816336568abe14610f4c57816341976e0914610f1c5781634cd452ba14610ee15781635c833bfd14610dd457816366b51da514610d985781636f60c96414610d2c57816379aa23ad14610d105781637e2fb9f414610cd857816381693d2714610cb3578163892b4f0814610ab15781638d169f4214610a6357816391d1485414610a1d5781639be918e6146109df5781639dcb511a1461098a578163a1547d1114610911578163a217fddf146108f6578163c5f87257146108bb578163c68dbb3714610864578163d547741f14610825578163deb06d4d146107b8578163e229cd76146107b3578163e23a6a2514610714578163e5406dbf146106df578163e88791db146106c3578163ed8b742b1461022157508063f25b9caa146102065763f84ef0f5146101c657600080fd5b346102025760203660031901126102025760209160ff9082906001600160a01b036101ef611434565b168152600a855220541690519015158152f35b5080fd5b503461020257816003193601126102025760209051601e8152f35b8284346106c05761023136611494565b7f933de1eea1e506159851d6a102568bb76240c15db448b4736be6fc8d8ce380a294929490818552602091858352848620338752835260ff8587205416156106a2575061027c611bba565b6001600160a01b0390868216906102948215156117df565b828516926102a384151561182a565b6102ae82151561166c565b8288526009855260ff87892054161561064f578388526009855260ff8789205416156105fc576102df82878b611895565b9099919786835260028852888a842054106105a65761030085303389611d11565b85835260028852898320610315868254611a5a565b90558683526002885289832061032c8a8254611710565b9055610339893389611bdd565b6008548560488c519e8f908c8201956001600160601b0319809260601b16875260601b16603482015201528c60684291015260888d015260888c5260c08c019167ffffffffffffffff918d84108385111761059357838c528d5190209c6101a081018481108482111761057f578f908f8f918f8f928f918f928f908f95938f948f9d9c9b8f946007956101809388525260e0810197885261010081019889526101208101998a5261014081019a8b5261016081019c8d52019c8d42905252528b209951166001600160601b0360a01b90818b5416178a558b60018b0192511690825416179055516002880155516003870155519085015560058401905195865192831161057f57600160401b9687841161056a578b908354858555808610610542575b50019186528a862090865b84811061052e575050505050600690519101556008549182101561051b5760018201806008558210156105085760609a5089949392857f0e1e1a1d3b4eef7481e00a3e7282f9d2f96279566fc476c86bb408a11042bec59360088e94527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155885190815287878201528989820152a4600180558251948552840152820152f35b634e487b7160e01b815260328b52602490fd5b634e487b7160e01b815260418b52602490fd5b8351821683820155928c0192600101610467565b84895285838a2091820191015b81811061055c575061045c565b8981558e935060010161054f565b508f866041602492634e487b7160e01b835252fd5b8f866041602492634e487b7160e01b835252fd5b634e487b7160e01b855260418f52602485fd5b895162461bcd60e51b8152808e01899052602a60248201527f5265736572766553797374656d3a20696e73756666696369656e7420746172676044820152696574207265736572766560b01b6064820152608490fd5b865162461bcd60e51b8152808b01869052602760248201527f5265736572766553797374656d3a20756e737570706f727465642074617267656044820152661d08185cdcd95d60ca1b6064820152608490fd5b865162461bcd60e51b8152808b01869052602760248201527f5265736572766553797374656d3a20756e737570706f7274656420736f7572636044820152661948185cdcd95d60ca1b6064820152608490fd5b845163e2517d3f60e01b815233818a01526024810191909152604490fd5b80fd5b50503461020257816003193601126102025760209051600a8152f35b505034610202578160031936011261020257610710906106fd611a67565b90519182916020835260208301906114c9565b0390f35b50503461020257806003193601126102025761072e611434565b9060243580151581036107af5761078991610747611ae0565b6001600160a01b03841661075c811515611506565b85526009602052808520600160ff19825416179055600a60205284209060ff801983541691151516179055565b61079a610794611a67565b82611d6a565b156107a3575080f35b6107ac90611552565b80f35b8380fd5b611413565b91905034610821576020366003190112610821578060c0938335815260076020522060018060a01b039283825416936001830154169260028301
|
||
|
|
"linkReferences": {},
|
||
|
|
"deployedLinkReferences": {}
|
||
|
|
}
|