mirror of
https://github.com/Instadapp/fluid-contracts-public.git
synced 2024-07-29 21:57:37 +00:00
967 lines
235 KiB
JSON
967 lines
235 KiB
JSON
|
{
|
||
|
"address": "0xC215485C572365AE87f908ad35233EC2572A3BEC",
|
||
|
"abi": [
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "contract IFluidLendingFactory",
|
||
|
"name": "lendingFactory_",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "contract IFluidLiquidityResolver",
|
||
|
"name": "liquidityResolver_",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "nonpayable",
|
||
|
"type": "constructor"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [],
|
||
|
"name": "FluidLendingResolver__AddressZero",
|
||
|
"type": "error"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [],
|
||
|
"name": "LENDING_FACTORY",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "contract IFluidLendingFactory",
|
||
|
"name": "",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [],
|
||
|
"name": "LIQUIDITY_RESOLVER",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "contract IFluidLiquidityResolver",
|
||
|
"name": "",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "asset_",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "string",
|
||
|
"name": "fTokenType_",
|
||
|
"type": "string"
|
||
|
}
|
||
|
],
|
||
|
"name": "computeFToken",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [],
|
||
|
"name": "getAllFTokenTypes",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "string[]",
|
||
|
"name": "",
|
||
|
"type": "string[]"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [],
|
||
|
"name": "getAllFTokens",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "address[]",
|
||
|
"name": "",
|
||
|
"type": "address[]"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "contract IFToken",
|
||
|
"name": "fToken_",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"name": "getFTokenDetails",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"components": [
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "tokenAddress",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "bool",
|
||
|
"name": "eip2612Deposits",
|
||
|
"type": "bool"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "bool",
|
||
|
"name": "isNativeUnderlying",
|
||
|
"type": "bool"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "string",
|
||
|
"name": "name",
|
||
|
"type": "string"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "string",
|
||
|
"name": "symbol",
|
||
|
"type": "string"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "decimals",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "asset",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "totalAssets",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "totalSupply",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "convertToShares",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "convertToAssets",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "rewardsRate",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "supplyRate",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "int256",
|
||
|
"name": "rebalanceDifference",
|
||
|
"type": "int256"
|
||
|
},
|
||
|
{
|
||
|
"components": [
|
||
|
{
|
||
|
"internalType": "bool",
|
||
|
"name": "modeWithInterest",
|
||
|
"type": "bool"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "supply",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "withdrawalLimit",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "lastUpdateTimestamp",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "expandPercent",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "expandDuration",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "baseWithdrawalLimit",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "withdrawableUntilLimit",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "withdrawable",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"internalType": "struct Structs.UserSupplyData",
|
||
|
"name": "liquidityUserSupplyData",
|
||
|
"type": "tuple"
|
||
|
}
|
||
|
],
|
||
|
"internalType": "struct Structs.FTokenDetails",
|
||
|
"name": "fTokenDetails_",
|
||
|
"type": "tuple"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "contract IFToken",
|
||
|
"name": "fToken_",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"name": "getFTokenInternalData",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "contract IFluidLiquidity",
|
||
|
"name": "liquidity_",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "contract IFluidLendingFactory",
|
||
|
"name": "lendingFactory_",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "contract IFluidLendingRewardsRateModel",
|
||
|
"name": "lendingRewardsRateModel_",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "contract IAllowanceTransfer",
|
||
|
"name": "permit2_",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "rebalancer_",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "bool",
|
||
|
"name": "rewardsActive_",
|
||
|
"type": "bool"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "liquidityBalance_",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "liquidityExchangePrice_",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "tokenExchangePrice_",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "contract IFToken",
|
||
|
"name": "fToken_",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"name": "getFTokenRewards",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "contract IFluidLendingRewardsRateModel",
|
||
|
"name": "rewardsRateModel_",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "rewardsRate_",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "contract IFToken",
|
||
|
"name": "fToken_",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"name": "getFTokenRewardsRateModelConfig",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "duration_",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "startTime_",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "endTime_",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "startTvl_",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "maxRate_",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "rewardAmount_",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "initiator_",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [],
|
||
|
"name": "getFTokensEntireData",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"components": [
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "tokenAddress",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "bool",
|
||
|
"name": "eip2612Deposits",
|
||
|
"type": "bool"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "bool",
|
||
|
"name": "isNativeUnderlying",
|
||
|
"type": "bool"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "string",
|
||
|
"name": "name",
|
||
|
"type": "string"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "string",
|
||
|
"name": "symbol",
|
||
|
"type": "string"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "decimals",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "asset",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "totalAssets",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "totalSupply",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "convertToShares",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "convertToAssets",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "rewardsRate",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "supplyRate",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "int256",
|
||
|
"name": "rebalanceDifference",
|
||
|
"type": "int256"
|
||
|
},
|
||
|
{
|
||
|
"components": [
|
||
|
{
|
||
|
"internalType": "bool",
|
||
|
"name": "modeWithInterest",
|
||
|
"type": "bool"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "supply",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "withdrawalLimit",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "lastUpdateTimestamp",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "expandPercent",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "expandDuration",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "baseWithdrawalLimit",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "withdrawableUntilLimit",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "withdrawable",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"internalType": "struct Structs.UserSupplyData",
|
||
|
"name": "liquidityUserSupplyData",
|
||
|
"type": "tuple"
|
||
|
}
|
||
|
],
|
||
|
"internalType": "struct Structs.FTokenDetails[]",
|
||
|
"name": "",
|
||
|
"type": "tuple[]"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "contract IFToken",
|
||
|
"name": "fToken_",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "assets_",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "shares_",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "getPreviews",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "previewDeposit_",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "previewMint_",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "previewWithdraw_",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "previewRedeem_",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "contract IFToken",
|
||
|
"name": "fToken_",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "user_",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"name": "getUserPosition",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"components": [
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "fTokenShares",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "underlyingAssets",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "underlyingBalance",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "allowance",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"internalType": "struct Structs.UserPosition",
|
||
|
"name": "userPosition",
|
||
|
"type": "tuple"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "user_",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"name": "getUserPositions",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"components": [
|
||
|
{
|
||
|
"components": [
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "tokenAddress",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "bool",
|
||
|
"name": "eip2612Deposits",
|
||
|
"type": "bool"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "bool",
|
||
|
"name": "isNativeUnderlying",
|
||
|
"type": "bool"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "string",
|
||
|
"name": "name",
|
||
|
"type": "string"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "string",
|
||
|
"name": "symbol",
|
||
|
"type": "string"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "decimals",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "asset",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "totalAssets",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "totalSupply",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "convertToShares",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "convertToAssets",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "rewardsRate",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "supplyRate",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "int256",
|
||
|
"name": "rebalanceDifference",
|
||
|
"type": "int256"
|
||
|
},
|
||
|
{
|
||
|
"components": [
|
||
|
{
|
||
|
"internalType": "bool",
|
||
|
"name": "modeWithInterest",
|
||
|
"type": "bool"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "supply",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "withdrawalLimit",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "lastUpdateTimestamp",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "expandPercent",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "expandDuration",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "baseWithdrawalLimit",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "withdrawableUntilLimit",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "withdrawable",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"internalType": "struct Structs.UserSupplyData",
|
||
|
"name": "liquidityUserSupplyData",
|
||
|
"type": "tuple"
|
||
|
}
|
||
|
],
|
||
|
"internalType": "struct Structs.FTokenDetails",
|
||
|
"name": "fTokenDetails",
|
||
|
"type": "tuple"
|
||
|
},
|
||
|
{
|
||
|
"components": [
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "fTokenShares",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "underlyingAssets",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "underlyingBalance",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "allowance",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"internalType": "struct Structs.UserPosition",
|
||
|
"name": "userPosition",
|
||
|
"type": "tuple"
|
||
|
}
|
||
|
],
|
||
|
"internalType": "struct Structs.FTokenDetailsUserPosition[]",
|
||
|
"name": "",
|
||
|
"type": "tuple[]"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "auth_",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"name": "isLendingFactoryAuth",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "bool",
|
||
|
"name": "",
|
||
|
"type": "bool"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "address",
|
||
|
"name": "deployer_",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"name": "isLendingFactoryDeployer",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "bool",
|
||
|
"name": "",
|
||
|
"type": "bool"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
}
|
||
|
],
|
||
|
"transactionHash": "0x4f9ba325a0d5ea7cd48ece14a4d0870606a492b9142f79d0e94a21f6d6073910",
|
||
|
"receipt": {
|
||
|
"to": "0x4e59b44847b379578588920cA78FbF26c0B4956C",
|
||
|
"from": "0x0Ed35B1609Ec45c7079E80d11149a52717e4859A",
|
||
|
"contractAddress": null,
|
||
|
"transactionIndex": 215,
|
||
|
"gasUsed": "2366859",
|
||
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||
|
"blockHash": "0xec0f4039878cb0ee6a6672d46e50806409795271cfabe586bf42c8626b0e5b08",
|
||
|
"transactionHash": "0x4f9ba325a0d5ea7cd48ece14a4d0870606a492b9142f79d0e94a21f6d6073910",
|
||
|
"logs": [],
|
||
|
"blockNumber": 19992071,
|
||
|
"cumulativeGasUsed": "23261908",
|
||
|
"status": 1,
|
||
|
"byzantium": true
|
||
|
},
|
||
|
"args": [
|
||
|
"0x54B91A0D94cb471F37f949c60F7Fa7935b551D03",
|
||
|
"0xD7588F6c99605Ab274C211a0AFeC60947668A8Cb"
|
||
|
],
|
||
|
"numDeployments": 3,
|
||
|
"solcInputHash": "033d84042c3fe6a1afa58a71e8e52d69",
|
||
|
"metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IFluidLendingFactory\",\"name\":\"lendingFactory_\",\"type\":\"address\"},{\"internalType\":\"contract IFluidLiquidityResolver\",\"name\":\"liquidityResolver_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"FluidLendingResolver__AddressZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LENDING_FACTORY\",\"outputs\":[{\"internalType\":\"contract IFluidLendingFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LIQUIDITY_RESOLVER\",\"outputs\":[{\"internalType\":\"contract IFluidLiquidityResolver\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"fTokenType_\",\"type\":\"string\"}],\"name\":\"computeFToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllFTokenTypes\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllFTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFToken\",\"name\":\"fToken_\",\"type\":\"address\"}],\"name\":\"getFTokenDetails\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"eip2612Deposits\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isNativeUnderlying\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"decimals\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"totalAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"convertToShares\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"convertToAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardsRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplyRate\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"rebalanceDifference\",\"type\":\"int256\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"modeWithInterest\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawalLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastUpdateTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expandPercent\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expandDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseWithdrawalLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawableUntilLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawable\",\"type\":\"uint256\"}],\"internalType\":\"struct Structs.UserSupplyData\",\"name\":\"liquidityUserSupplyData\",\"type\":\"tuple\"}],\"internalType\":\"struct Structs.FTokenDetails\",\"name\":\"fTokenDetails_\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFToken\",\"name\":\"fToken_\",\"type\":\"address\"}],\"name\":\"getFTokenInternalData\",\"outputs\":[{\"internalType\":\"contract IFluidLiquidity\",\"name\":\"liquidity_\",\"type\":\"address\"},{\"internalType\":\"contract IFluidLendingFactory\",\"name\":\"lendi
|
||
|
"bytecode": "0x60c06040523480156200001157600080fd5b5060405162002afd38038062002afd8339810160408190526200003491620000a2565b6001600160a01b03821615806200005257506001600160a01b038116155b1562000071576040516314a3366960e11b815260040160405180910390fd5b6001600160a01b039182166080521660a052620000e1565b6001600160a01b03811681146200009f57600080fd5b50565b60008060408385031215620000b657600080fd5b8251620000c38162000089565b6020840151909250620000d68162000089565b809150509250929050565b60805160a0516129cc62000131600039600081816101c001526112760152600081816102f2015281816108940152818161094c01528181610a4301528181610aff0152610b7001526129cc6000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80637a923a4d1161009757806396bac9311161006657806396bac931146102ed578063c4877f3a14610314578063d7a6fdb014610372578063e26533a31461039257600080fd5b80637a923a4d1461022a5780638ac9aad91461023d5780638c0293321461025057806392a576e6146102cd57600080fd5b80634af955c8116100d35780634af955c8146101915780634ec1e916146101a65780636902f79f146101bb57806370f53bc01461020757600080fd5b806314a287ab146100fa5780632a6bc2dd1461013e5780633caa319f1461015e575b600080fd5b61010d610108366004611a95565b6103a7565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152015b60405180910390f35b61015161014c366004611a95565b610549565b6040516101359190611c90565b61017161016c366004611d51565b61064d565b604080519485526020850193909352918301526060820152608001610135565b610199610890565b6040516101359190611d86565b6101ae610948565b6040516101359190611de0565b6101e27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610135565b61021a610215366004611a95565b6109fb565b6040519015158152602001610135565b61021a610238366004611a95565b610ab7565b6101e261024b366004611e53565b610b30565b61026361025e366004611a95565b610bf2565b6040805173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a0152968916968801969096529387166060870152959091166080850152151560a084015260c083019390935260e082019290925261010081019190915261012001610135565b6102e06102db366004611ed8565b610c8f565b6040516101359190611f11565b6101e27f000000000000000000000000000000000000000000000000000000000000000081565b610327610322366004611a95565b610f92565b604080519788526020880196909652948601939093526060850191909152608084015260a083015273ffffffffffffffffffffffffffffffffffffffff1660c082015260e001610135565b610385610380366004611a95565b6110c4565b6040516101359190611f3c565b61039a611879565b6040516101359190611f4f565b60008060008373ffffffffffffffffffffffffffffffffffffffff16633bc5de306040518163ffffffff1660e01b815260040161012060405180830381865afa1580156103f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041c9190611fd7565b50949950909650869550508415935061044e92505050575073ffffffffffffffffffffffffffffffffffffffff831615155b15610543578273ffffffffffffffffffffffffffffffffffffffff1663577640948573ffffffffffffffffffffffffffffffffffffffff166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de9190612078565b6040518263ffffffff1660e01b81526004016104fc91815260200190565b606060405180830381865afa158015610519573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053d9190612091565b50909250505b50915091565b60606000610555611879565b90506000815167ffffffffffffffff811115610573576105736120c6565b6040519080825280602002602001820160405280156105ac57816020015b610599611939565b8152602001906001900390816105915790505b50905060005b8251811015610645578281815181106105cd576105cd6120f5565b60200260200101518282815181106105e7576105e76120f5565b60200260200101516000018190525061061d83828151811061060b5761060b6120f5565b60200260200101516000015186610c8f565b82828151811061062f5761062f6120f5565b60209081029190910181015101526001016105b2565b509392505050565b6000806000808673ffffffffffffffffffffffffffffffffffffffff1663ef8b30f7876040518263ffffffff1660e01b815260040161068e91815260200190565b602060405180830381865afa1580156106ab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190
|
||
|
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80637a923a4d1161009757806396bac9311161006657806396bac931146102ed578063c4877f3a14610314578063d7a6fdb014610372578063e26533a31461039257600080fd5b80637a923a4d1461022a5780638ac9aad91461023d5780638c0293321461025057806392a576e6146102cd57600080fd5b80634af955c8116100d35780634af955c8146101915780634ec1e916146101a65780636902f79f146101bb57806370f53bc01461020757600080fd5b806314a287ab146100fa5780632a6bc2dd1461013e5780633caa319f1461015e575b600080fd5b61010d610108366004611a95565b6103a7565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152015b60405180910390f35b61015161014c366004611a95565b610549565b6040516101359190611c90565b61017161016c366004611d51565b61064d565b604080519485526020850193909352918301526060820152608001610135565b610199610890565b6040516101359190611d86565b6101ae610948565b6040516101359190611de0565b6101e27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610135565b61021a610215366004611a95565b6109fb565b6040519015158152602001610135565b61021a610238366004611a95565b610ab7565b6101e261024b366004611e53565b610b30565b61026361025e366004611a95565b610bf2565b6040805173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a0152968916968801969096529387166060870152959091166080850152151560a084015260c083019390935260e082019290925261010081019190915261012001610135565b6102e06102db366004611ed8565b610c8f565b6040516101359190611f11565b6101e27f000000000000000000000000000000000000000000000000000000000000000081565b610327610322366004611a95565b610f92565b604080519788526020880196909652948601939093526060850191909152608084015260a083015273ffffffffffffffffffffffffffffffffffffffff1660c082015260e001610135565b610385610380366004611a95565b6110c4565b6040516101359190611f3c565b61039a611879565b6040516101359190611f4f565b60008060008373ffffffffffffffffffffffffffffffffffffffff16633bc5de306040518163ffffffff1660e01b815260040161012060405180830381865afa1580156103f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041c9190611fd7565b50949950909650869550508415935061044e92505050575073ffffffffffffffffffffffffffffffffffffffff831615155b15610543578273ffffffffffffffffffffffffffffffffffffffff1663577640948573ffffffffffffffffffffffffffffffffffffffff166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de9190612078565b6040518263ffffffff1660e01b81526004016104fc91815260200190565b606060405180830381865afa158015610519573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053d9190612091565b50909250505b50915091565b60606000610555611879565b90506000815167ffffffffffffffff811115610573576105736120c6565b6040519080825280602002602001820160405280156105ac57816020015b610599611939565b8152602001906001900390816105915790505b50905060005b8251811015610645578281815181106105cd576105cd6120f5565b60200260200101518282815181106105e7576105e76120f5565b60200260200101516000018190525061061d83828151811061060b5761060b6120f5565b60200260200101516000015186610c8f565b82828151811061062f5761062f6120f5565b60209081029190910181015101526001016105b2565b509392505050565b6000806000808673ffffffffffffffffffffffffffffffffffffffff1663ef8b30f7876040518263ffffffff1660e01b815260040161068e91815260200190565b602060405180830381865afa1580156106ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106cf9190612078565b6040517fb3d7f6b90000000000000000000000000000000000000000000000000000000081526004810187905290945073ffffffffffffffffffffffffffffffffffffffff88169063b3d7f6b990602401602060405180830381865afa15801561073d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107619190612078565b6040517f0a28a4770000000000000000000000000000000000000000000000000000000081526004810188905290935073ffffffffffffffffffffffffffffffffffffffff881690630a28a47790602401602060405180830381865afa1580156107cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f3919061207856
|
||
|
"devdoc": {
|
||
|
"kind": "dev",
|
||
|
"methods": {
|
||
|
"computeFToken(address,string)": {
|
||
|
"params": {
|
||
|
"asset_": "address of the asset",
|
||
|
"fTokenType_": "type of fToken: - if underlying asset supports EIP-2612, the fToken should be type `EIP2612Deposits` - otherwise it should use `Permit2Deposits` - if it's the native token, it should use `NativeUnderlying` - could be more types available, check `fTokenTypes()`"
|
||
|
},
|
||
|
"returns": {
|
||
|
"_0": "token_ detemrinistic address of the computed token"
|
||
|
}
|
||
|
},
|
||
|
"getFTokenDetails(address)": {
|
||
|
"params": {
|
||
|
"fToken_": "the fToken to get the details for"
|
||
|
},
|
||
|
"returns": {
|
||
|
"fTokenDetails_": " retrieved FTokenDetails struct"
|
||
|
}
|
||
|
},
|
||
|
"getFTokenInternalData(address)": {
|
||
|
"params": {
|
||
|
"fToken_": "the fToken to get the data for"
|
||
|
},
|
||
|
"returns": {
|
||
|
"lendingFactory_": "address of the Lending factory contract.",
|
||
|
"lendingRewardsRateModel_": "address of the rewards rate model contract. changeable by LendingFactory auths.",
|
||
|
"liquidityBalance_": "current Liquidity supply balance of `address(this)` for the underyling asset",
|
||
|
"liquidityExchangePrice_": "(updated) exchange price for the underlying assset in the liquidity protocol (without rewards)",
|
||
|
"liquidity_": "address of the Liquidity contract.",
|
||
|
"permit2_": "address of the Permit2 contract used for deposits / mint with signature",
|
||
|
"rebalancer_": "address of the rebalancer allowed to execute `rebalance()`",
|
||
|
"rewardsActive_": "true if rewards are currently active",
|
||
|
"tokenExchangePrice_": "(updated) exchange price between fToken and the underlying assset (with rewards)"
|
||
|
}
|
||
|
},
|
||
|
"getPreviews(address,uint256,uint256)": {
|
||
|
"returns": {
|
||
|
"previewDeposit_": "preview for deposit of `assets_`",
|
||
|
"previewMint_": "preview for mint of `shares_`",
|
||
|
"previewRedeem_": "preview for redeem of `shares_`",
|
||
|
"previewWithdraw_": "preview for withdraw of `assets_`"
|
||
|
}
|
||
|
},
|
||
|
"getUserPosition(address,address)": {
|
||
|
"returns": {
|
||
|
"userPosition": "user position struct"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"stateVariables": {
|
||
|
"_NATIVE_TOKEN_ADDRESS": {
|
||
|
"details": "address that is mapped to the chain native token"
|
||
|
}
|
||
|
},
|
||
|
"version": 1
|
||
|
},
|
||
|
"userdoc": {
|
||
|
"errors": {
|
||
|
"FluidLendingResolver__AddressZero()": [
|
||
|
{
|
||
|
"notice": "thrown if an input param address is zero"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"kind": "user",
|
||
|
"methods": {
|
||
|
"LENDING_FACTORY()": {
|
||
|
"notice": "returns the lending factory address"
|
||
|
},
|
||
|
"LIQUIDITY_RESOLVER()": {
|
||
|
"notice": "returns the liquidity resolver address"
|
||
|
},
|
||
|
"computeFToken(address,string)": {
|
||
|
"notice": "computes deterministic token address for `asset_` for a lending protocol"
|
||
|
},
|
||
|
"constructor": {
|
||
|
"notice": "constructor sets the immutable `LENDING_FACTORY` and `LIQUIDITY_RESOLVER` address"
|
||
|
},
|
||
|
"getAllFTokenTypes()": {
|
||
|
"notice": "returns all fToken types at the `LENDING_FACTORY`"
|
||
|
},
|
||
|
"getAllFTokens()": {
|
||
|
"notice": "returns all created fTokens at the `LENDING_FACTORY`"
|
||
|
},
|
||
|
"getFTokenDetails(address)": {
|
||
|
"notice": "gets all public details for a certain `fToken_`, such as fToken type, name, symbol, decimals, underlying asset, total amounts, convertTo values, rewards. Note it also returns whether the fToken supports deposits / mints via EIP-2612, but it is not a 100% guarantee! To make sure, check for the underlying if it supports EIP-2612 manually."
|
||
|
},
|
||
|
"getFTokenInternalData(address)": {
|
||
|
"notice": "returns config, rewards and exchange prices data of an fToken."
|
||
|
},
|
||
|
"getFTokenRewards(address)": {
|
||
|
"notice": "gets rewards related data: the `rewardsRateModel_` contract and the current `rewardsRate_` for the `fToken_`"
|
||
|
},
|
||
|
"getFTokenRewardsRateModelConfig(address)": {
|
||
|
"notice": "gets rewards rate model config constants"
|
||
|
},
|
||
|
"getFTokensEntireData()": {
|
||
|
"notice": "gets all public details for all itokens, such as fToken type, name, symbol, decimals, underlying asset, total amounts, convertTo values, rewards"
|
||
|
},
|
||
|
"getPreviews(address,uint256,uint256)": {
|
||
|
"notice": "gets `fToken_` preview amounts for `assets_` or `shares_`."
|
||
|
},
|
||
|
"getUserPosition(address,address)": {
|
||
|
"notice": "gets a `user_` position for an `fToken_`."
|
||
|
},
|
||
|
"getUserPositions(address)": {
|
||
|
"notice": "gets all public details for all itokens, such as fToken type, name, symbol, decimals, underlying asset, total amounts, convertTo values, rewards and user position for each token"
|
||
|
},
|
||
|
"isLendingFactoryAuth(address)": {
|
||
|
"notice": "reads if a certain `auth_` address is an allowed auth or not. Owner is auth by default."
|
||
|
},
|
||
|
"isLendingFactoryDeployer(address)": {
|
||
|
"notice": "reads if a certain `deployer_` address is an allowed deployer or not. Owner is deployer by default."
|
||
|
}
|
||
|
},
|
||
|
"notice": "Fluid Lending protocol (fTokens) resolver Implements various view-only methods to give easy access to Lending protocol data.",
|
||
|
"version": 1
|
||
|
},
|
||
|
"storageLayout": {
|
||
|
"storage": [],
|
||
|
"types": null
|
||
|
}
|
||
|
}
|