fluid-contracts-public/deployments/mainnet/v1_0_0/Vault_ETH_USDT.json

670 lines
109 KiB
JSON
Raw Normal View History

{
"address": "0xbEC491FeF7B4f666b270F9D5E5C3f443cBf20991",
"abi": [
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "liquidity",
"type": "address"
},
{
"internalType": "address",
"name": "factory",
"type": "address"
},
{
"internalType": "address",
"name": "adminImplementation",
"type": "address"
},
{
"internalType": "address",
"name": "secondaryImplementation",
"type": "address"
},
{
"internalType": "address",
"name": "supplyToken",
"type": "address"
},
{
"internalType": "address",
"name": "borrowToken",
"type": "address"
},
{
"internalType": "uint8",
"name": "supplyDecimals",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "borrowDecimals",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "vaultId",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "liquiditySupplyExchangePriceSlot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "liquidityBorrowExchangePriceSlot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "liquidityUserSupplySlot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "liquidityUserBorrowSlot",
"type": "bytes32"
}
],
"internalType": "struct Structs.ConstantViews",
"name": "constants_",
"type": "tuple"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "colLiquidated",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "debtLiquidated",
"type": "uint256"
}
],
"name": "FluidLiquidateResult",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "errorId_",
"type": "uint256"
}
],
"name": "FluidLiquidityCalcsError",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "errorId_",
"type": "uint256"
}
],
"name": "FluidSafeTransferError",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "errorId_",
"type": "uint256"
}
],
"name": "FluidVaultError",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "colAbsorbedRaw_",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "debtAbsorbedRaw_",
"type": "uint256"
}
],
"name": "LogAbsorb",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "liquidator_",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "colAmt_",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "debtAmt_",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "to_",
"type": "address"
}
],
"name": "LogLiquidate",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "user_",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "nftId_",
"type": "uint256"
},
{
"indexed": false,
"internalType": "int256",
"name": "colAmt_",
"type": "int256"
},
{
"indexed": false,
"internalType": "int256",
"name": "debtAmt_",
"type": "int256"
},
{
"indexed": false,
"internalType": "address",
"name": "to_",
"type": "address"
}
],
"name": "LogOperate",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "int256",
"name": "colAmt_",
"type": "int256"
},
{
"indexed": false,
"internalType": "int256",
"name": "debtAmt_",
"type": "int256"
}
],
"name": "LogRebalance",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "supplyExPrice_",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "borrowExPrice_",
"type": "uint256"
}
],
"name": "LogUpdateExchangePrice",
"type": "event"
},
{
"stateMutability": "nonpayable",
"type": "fallback"
},
{
"inputs": [],
"name": "LIQUIDITY",
"outputs": [
{
"internalType": "contract IFluidLiquidity",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "VAULT_FACTORY",
"outputs": [
{
"internalType": "contract IFluidVaultFactory",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "VAULT_ID",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "absorb",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "constantsView",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "liquidity",
"type": "address"
},
{
"internalType": "address",
"name": "factory",
"type": "address"
},
{
"internalType": "address",
"name": "adminImplementation",
"type": "address"
},
{
"internalType": "address",
"name": "secondaryImplementation",
"type": "address"
},
{
"internalType": "address",
"name": "supplyToken",
"type": "address"
},
{
"internalType": "address",
"name": "borrowToken",
"type": "address"
},
{
"internalType": "uint8",
"name": "supplyDecimals",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "borrowDecimals",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "vaultId",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "liquiditySupplyExchangePriceSlot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "liquidityBorrowExchangePriceSlot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "liquidityUserSupplySlot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "liquidityUserBorrowSlot",
"type": "bytes32"
}
],
"internalType": "struct Structs.ConstantViews",
"name": "constantsView_",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "int256",
"name": "positionTick_",
"type": "int256"
},
{
"internalType": "uint256",
"name": "positionTickId_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "positionRawDebt_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tickData_",
"type": "uint256"
}
],
"name": "fetchLatestPosition",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "positionRawCol_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "branchId_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "branchData_",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "debtAmt_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "colPerUnitDebt_",
"type": "uint256"
},
{
"internalType": "address",
"name": "to_",
"type": "address"
},
{
"internalType": "bool",
"name": "absorb_",
"type": "bool"
}
],
"name": "liquidate",
"outputs": [
{
"internalType": "uint256",
"name": "actualDebtAmt_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "actualColAmt_",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token_",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount_",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data_",
"type": "bytes"
}
],
"name": "liquidityCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "nftId_",
"type": "uint256"
},
{
"internalType": "int256",
"name": "newCol_",
"type": "int256"
},
{
"internalType": "int256",
"name": "newDebt_",
"type": "int256"
},
{
"internalType": "address",
"name": "to_",
"type": "address"
}
],
"name": "operate",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "int256",
"name": "",
"type": "int256"
},
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "slot_",
"type": "bytes32"
}
],
"name": "readFromStorage",
"outputs": [
{
"internalType": "uint256",
"name": "result_",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "rebalance",
"outputs": [
{
"internalType": "int256",
"name": "supplyAmt_",
"type": "int256"
},
{
"internalType": "int256",
"name": "borrowAmt_",
"type": "int256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "vaultVariables2_",
"type": "uint256"
}
],
"name": "updateExchangePrices",
"outputs": [
{
"internalType": "uint256",
"name": "liqSupplyExPrice_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "liqBorrowExPrice_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "vaultSupplyExPrice_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "vaultBorrowExPrice_",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "updateExchangePricesOnStorage",
"outputs": [
{
"internalType": "uint256",
"name": "liqSupplyExPrice_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "liqBorrowExPrice_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "vaultSupplyExPrice_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "vaultBorrowExPrice_",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x00d5a8ff5899e251aee1efe1084fc5acb2f573475838b6d861ae775f6b499c40",
"args": [
{
"liquidity": "0x52Aa899454998Be5b000Ad077a46Bbe360F4e497",
"factory": "0x324c5Dc1fC42c7a4D43d92df1eBA58a54d13Bf2d",
"adminImplementation": "0x8730d7a5aF435678b2686289eEB6A74A042081e6",
"secondaryImplementation": "0x836580Dc0B1FF9351c58c173CD1dA8b31A536733",
"supplyToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"borrowToken": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"supplyDecimals": 18,
"borrowDecimals": 6,
"vaultId": 2,
"liquidityTotalSupplySlot": "0xb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e",
"liquidityTotalBorrowSlot": "0x76591fc11dbbd749b6df72a71faf88b812c3702b5747249a615a8b3dc6bb6a6a",
"liquiditySupplyExchangePriceSlot": "0xa1829a9003092132f585b6ccdd167c19fe9774dbdea4260287e8a8e8ca8185d7",
"liquidityBorrowExchangePriceSlot": "0x0a7e0e74b40a947daf7b6df34c66be699f819f509940d1bd48c4d99bc5e3353c",
"liquidityUserSupplySlot": "0x776cd5725ae71a27d4514f13468fdc5a7774280e2ac813a5b713bf9400ce19d7",
"liquidityUserBorrowSlot": "0x789444cbdbe0433c8b0cf168836cd1a4bfb2d155afdec4752dcb05b6055cdc93"
}
],
"numDeployments": 1,
"bytecode": "0x6102206040523480156200001257600080fd5b5060405162005fa238038062005fa28339810160408190526200003591620002a6565b80516001600160a01b0390811661014081815260208401518316610160908152610100808601516101809081526080808801518716905260a0808801518716905260c08088015160ff90811690915260e0808901519091169052610120808801516101a0819052948801516101c052928701516101e052860151610200526040808701518616909152606086015190941690526000805466100000004000001781559251632d71cdb960e21b815260048101919091526001600160401b0391605b9163b5c736e490602401602060405180830381865afa1580156200011e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000144919062000396565b901c16905060006001600160401b03609b610140516001600160a01b031663b5c736e46101c0516040518263ffffffff1660e01b81526004016200018a91815260200190565b602060405180830381865afa158015620001a8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ce919062000396565b901c16905064e8d4a51000821080620001eb575064e8d4a5100081105b1562000212576040516330090e6560e11b8152617924600482015260240160405180910390fd5b60401b177ce8d4a51000000000e8d4a51000000000000000000000000000000000001760085550620003b0565b6040516101a081016001600160401b03811182821017156200027157634e487b7160e01b600052604160045260246000fd5b60405290565b80516001600160a01b03811681146200028f57600080fd5b919050565b805160ff811681146200028f57600080fd5b60006101a08284031215620002ba57600080fd5b620002c46200023f565b620002cf8362000277565b8152620002df6020840162000277565b6020820152620002f26040840162000277565b6040820152620003056060840162000277565b6060820152620003186080840162000277565b60808201526200032b60a0840162000277565b60a08201526200033e60c0840162000294565b60c08201526200035160e0840162000294565b60e08201526101008381015190820152610120808401519082015261014080840151908201526101608084015190820152610180928301519281019290925250919050565b600060208284031215620003a957600080fd5b5051919050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e05161020051615a526200055060003960006106fe0152600081816106d70152611c010152600081816106b001526124b301526000818161068901526123d1015260008181610458015281816106620152610c1f01526000818161010d015281816101c7015281816103830152818161054b01528181610c4b0152610d3b0152600081816104240152818161052601528181611c2701528181611d5101528181611f8e015281816120ad0152818161219201528181612419015281816124e001528181613c5601528181613d7301528181613f7f015261402f01526000818161059a01528181612906015261405f01526000818161028b01526105730152600061063b015260006106130152600081816105ea01528181610a4701528181611ef001528181611fcb015281816121d001528181612a4601528181613bf90152613c930152600081816105c2015281816109a101528181611db801528181611dfd015281816120eb0152613d9a0152615a526000f3fe6080604052600436106100d25760003560e01c8063540acabc1161007f578063ad20750111610059578063ad207501146104b8578063b5c736e4146104d8578063b7791bf2146104f7578063ebd93ac61461072f576100d2565b8063540acabc146104465780637d7c2a1c146104885780638433ea22146104a5576100d2565b8063103f2907116100b0578063103f29071461037157806322348cc7146103ca5780632861c7d114610412576100d2565b806302161887146102e9578063032d22761461032357806309f0d8cb14610351575b3480156100de57600080fd5b506040517f4502d0630000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634502d06390602401602060405180830381865afa158015610169573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018d9190615424565b8061024757506040517fe04c8e5d0000000000000000000000000000000000000000000000000000000081523060048201523360248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063e04c8e5d90604401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190615424565b610286576040517f60121cca00000000000000000000000000000000000000000000000000000000815261792560048201526024015b60405180910390fd5b6102e77f00000000000000000000000000000000000000000000000000000000
"deployedBytecode": "0x6080604052600436106100d25760003560e01c8063540acabc1161007f578063ad20750111610059578063ad207501146104b8578063b5c736e4146104d8578063b7791bf2146104f7578063ebd93ac61461072f576100d2565b8063540acabc146104465780637d7c2a1c146104885780638433ea22146104a5576100d2565b8063103f2907116100b0578063103f29071461037157806322348cc7146103ca5780632861c7d114610412576100d2565b806302161887146102e9578063032d22761461032357806309f0d8cb14610351575b3480156100de57600080fd5b506040517f4502d0630000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634502d06390602401602060405180830381865afa158015610169573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018d9190615424565b8061024757506040517fe04c8e5d0000000000000000000000000000000000000000000000000000000081523060048201523360248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063e04c8e5d90604401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190615424565b610286576040517f60121cca00000000000000000000000000000000000000000000000000000000815261792560048201526024015b60405180910390fd5b6102e77f00000000000000000000000000000000000000000000000000000000000000006000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061074492505050565b005b3480156102f557600080fd5b506102fe610790565b6040805194855260208501939093529183015260608201526080015b60405180910390f35b610336610331366004615463565b610884565b6040805193845260208401929092529082015260600161031a565b34801561035d57600080fd5b506102fe61036c3660046154a4565b6123a6565b34801561037d57600080fd5b506103a57f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161031a565b3480156103d657600080fd5b506103ea6103e53660046154bd565b61263e565b604080519586526020860194909452928401919091526060830152608082015260a00161031a565b34801561041e57600080fd5b506103a57f000000000000000000000000000000000000000000000000000000000000000081565b34801561045257600080fd5b5061047a7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161031a565b6104906128fe565b6040805192835260208301919091520161031a565b6104906104b33660046154ef565b61297e565b3480156104c457600080fd5b506102e76104d336600461552e565b613f67565b3480156104e457600080fd5b5061047a6104f33660046154a4565b5490565b34801561050357600080fd5b50604080516101a08101825273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811682527f0000000000000000000000000000000000000000000000000000000000000000811660208301527f00000000000000000000000000000000000000000000000000000000000000008116828401527f0000000000000000000000000000000000000000000000000000000000000000811660608301527f0000000000000000000000000000000000000000000000000000000000000000811660808301527f00000000000000000000000000000000000000000000000000000000000000001660a082015260ff7f0000000000000000000000000000000000000000000000000000000000000000811660c08301527f00000000000000000000000000000000000000000000000000000000000000001660e08201527f00000000000000000000000000000000000000000000000000000000000000006101008201527f00000000000000000000000000000000000000000000000000000000000000006101208201527f00000000000000000000000000000000000000000000000000000000000000006101408201527f00000000000000000000000000000000000000000000000000000000000000006101608201527f0000000000000000000000000000000000000000000000000000000000000000610180820152905161031a91906155b7565b34801561073b57600080fd5b506102e761405a565b6060600080835160208501865af43d6040519250601f19601f6020830101168301604052808352806000602085013e81156001810361078757816000803e816000fd5b50505092915050565b6000806000806107a16001546123a6565b9296509094509250905067ffffffffffffffff8411806107c8575067ffffffffffffffff83115b806107da575067ffffffffffffffff82115b806107ec575067ffffffffffffffff81115b156108275760
}