fluid-contracts-public/deployments/arbitrum/dump/0x1c2bB46f36561bc4F05A94BD50916496aa501078.json

663 lines
111 KiB
JSON
Raw Permalink Normal View History

{
"address": "0x1c2bB46f36561bc4F05A94BD50916496aa501078",
"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": "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": "0X53F8941DF03B138FAE389BFD96AEB04D568C62A34838EDD8738F96CCD18A760E",
"args": [
{
"liquidity": "0x52Aa899454998Be5b000Ad077a46Bbe360F4e497",
"factory": "0x324c5Dc1fC42c7a4D43d92df1eBA58a54d13Bf2d",
"adminImplementation": "0x5dDf07980ADD152D518AE463269e1A97e93EE1a9",
"secondaryImplementation": "0xbd6C8ee7CB9a13333e043C4d5fCf3ac125f7f890",
"supplyToken": "0x5979d7b546e38e414f7e9822514be443a4800529",
"borrowToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"supplyDecimals": 18,
"borrowDecimals": 18,
"vaultId": 5,
"liquidityTotalSupplySlot": "0x58aa9f5151d9430d43bed5cd04d4a088f7c9803eeac503d21209672c7d3a4b9a",
"liquidityTotalBorrowSlot": "0xb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e",
"liquiditySupplyExchangePriceSlot": "0xf3dad1157554688b243cfc80212ae06c4bd92450ccab99da3bca5425bc6b716f",
"liquidityBorrowExchangePriceSlot": "0xa1829a9003092132f585b6ccdd167c19fe9774dbdea4260287e8a8e8ca8185d7",
"liquidityUserSupplySlot": "0x13e494d8c449f995166500327f8979201af45c436f171ee422b32a11f36c48f0",
"liquidityUserBorrowSlot": "0x607765b9eca5a07fd2e781be7f9051d22102707ae81ab1e01daaecbb5adc3f47"
}
],
"numDeployments": 1,
"bytecode": "0x6102206040523480156200001257600080fd5b506040516200621f3803806200621f8339810160408190526200003591620002a6565b80516001600160a01b0390811661014081815260208401518316610160908152610100808601516101809081526080808801518716905260a0808801518716905260c08088015160ff90811690915260e0808901519091169052610120808801516101a0819052948801516101c052928701516101e052860151610200526040808701518616909152606086015190941690526000805466100000004000001781559251632d71cdb960e21b815260048101919091526001600160401b0391605b9163b5c736e490602401602060405180830381865afa1580156200011e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000144919062000396565b901c16905060006001600160401b03609b610140516001600160a01b031663b5c736e46101c0516040518263ffffffff1660e01b81526004016200018a91815260200190565b602060405180830381865afa158015620001a8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ce919062000396565b901c16905064e8d4a51000821080620001eb575064e8d4a5100081105b1562000212576040516330090e6560e11b8152617924600482015260240160405180910390fd5b60401b177ce8d4a51000000000e8d4a51000000000000000000000000000000000001760085550620003b0565b6040516101a081016001600160401b03811182821017156200027157634e487b7160e01b600052604160045260246000fd5b60405290565b80516001600160a01b03811681146200028f57600080fd5b919050565b805160ff811681146200028f57600080fd5b60006101a08284031215620002ba57600080fd5b620002c46200023f565b620002cf8362000277565b8152620002df6020840162000277565b6020820152620002f26040840162000277565b6040820152620003056060840162000277565b6060820152620003186080840162000277565b60808201526200032b60a0840162000277565b60a08201526200033e60c0840162000294565b60c08201526200035160e0840162000294565b60e08201526101008381015190820152610120808401519082015261014080840151908201526101608084015190820152610180928301519281019290925250919050565b600060208284031215620003a957600080fd5b5051919050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e05161020051615ccf6200055060003960006106f30152600081816106cc0152611c2b0152600081816106a501526124dd01526000818161067e01526123fb01526000818161044d015281816106570152610bff015260008181610102015281816101bc015281816103780152818161054001528181610c2b0152610d1b0152600081816104190152818161051b01528181611c5101528181611d7b01528181611fb8015281816120d7015281816121bc015281816124430152818161250a01528181613f260152818161404301528181614250015261430001526000818161058f015281816129300152612e0d015260008181610280015261056801526000610630015260006106080152600081816105df01528181610a2701528181611f1a01528181611ff5015281816121fa01528181612a1601528181613ec90152613f630152600081816105b70152818161098101528181611de201528181611e2701528181612115015261406a0152615ccf6000f3fe6080604052600436106100c75760003560e01c8063540acabc11610074578063ad2075011161004e578063ad207501146104ad578063b5c736e4146104cd578063b7791bf2146104ec576100c7565b8063540acabc1461043b5780637d7c2a1c1461047d5780638433ea221461049a576100c7565b8063103f2907116100a5578063103f29071461036657806322348cc7146103bf5780632861c7d114610407576100c7565b806302161887146102de578063032d22761461031857806309f0d8cb14610346575b3480156100d357600080fd5b506040517f4502d0630000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634502d06390602401602060405180830381865afa15801561015e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018291906156a1565b8061023c57506040517fe04c8e5d0000000000000000000000000000000000000000000000000000000081523060048201523360248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063e04c8e5d90604401602060405180830381865afa158015610218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023c91906156a1565b61027b576040517f60121cca00000000000000000000000000000000000000000000000000000000815261792560048201526024015b60405180910390fd5b6102dc7f00000000000000000000000000000000000000000000000000000000000000006000368080601f
"deployedBytecode": "0x6080604052600436106100c75760003560e01c8063540acabc11610074578063ad2075011161004e578063ad207501146104ad578063b5c736e4146104cd578063b7791bf2146104ec576100c7565b8063540acabc1461043b5780637d7c2a1c1461047d5780638433ea221461049a576100c7565b8063103f2907116100a5578063103f29071461036657806322348cc7146103bf5780632861c7d114610407576100c7565b806302161887146102de578063032d22761461031857806309f0d8cb14610346575b3480156100d357600080fd5b506040517f4502d0630000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634502d06390602401602060405180830381865afa15801561015e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018291906156a1565b8061023c57506040517fe04c8e5d0000000000000000000000000000000000000000000000000000000081523060048201523360248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063e04c8e5d90604401602060405180830381865afa158015610218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023c91906156a1565b61027b576040517f60121cca00000000000000000000000000000000000000000000000000000000815261792560048201526024015b60405180910390fd5b6102dc7f00000000000000000000000000000000000000000000000000000000000000006000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061072492505050565b005b3480156102ea57600080fd5b506102f3610770565b6040805194855260208501939093529183015260608201526080015b60405180910390f35b61032b6103263660046156e0565b610864565b6040805193845260208401929092529082015260600161030f565b34801561035257600080fd5b506102f3610361366004615721565b6123d0565b34801561037257600080fd5b5061039a7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161030f565b3480156103cb57600080fd5b506103df6103da36600461573a565b612668565b604080519586526020860194909452928401919091526060830152608082015260a00161030f565b34801561041357600080fd5b5061039a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561044757600080fd5b5061046f7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161030f565b610485612928565b6040805192835260208301919091520161030f565b6104856104a836600461576c565b6129a8565b3480156104b957600080fd5b506102dc6104c83660046157ab565b614238565b3480156104d957600080fd5b5061046f6104e8366004615721565b5490565b3480156104f857600080fd5b50604080516101a08101825273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811682527f0000000000000000000000000000000000000000000000000000000000000000811660208301527f00000000000000000000000000000000000000000000000000000000000000008116828401527f0000000000000000000000000000000000000000000000000000000000000000811660608301527f0000000000000000000000000000000000000000000000000000000000000000811660808301527f00000000000000000000000000000000000000000000000000000000000000001660a082015260ff7f0000000000000000000000000000000000000000000000000000000000000000811660c08301527f00000000000000000000000000000000000000000000000000000000000000001660e08201527f00000000000000000000000000000000000000000000000000000000000000006101008201527f00000000000000000000000000000000000000000000000000000000000000006101208201527f00000000000000000000000000000000000000000000000000000000000000006101408201527f00000000000000000000000000000000000000000000000000000000000000006101608201527f0000000000000000000000000000000000000000000000000000000000000000610180820152905161030f9190615834565b6060600080835160208501865af43d6040519250601f19601f6020830101168301604052808352806000602085013e81156001810361076757816000803e816000fd5b50505092915050565b6000806000806107816001546123d0565b9296509094509250905067ffffffffffffffff8411806107a8575067ffffffffffffffff83115b806107ba575067ffffffffffffffff82115b806107cc575067ffffffffffffffff81115b15610807576040517f60121cca00000000000000000000000000000000000000000000000000
}