@ensuro/cash-flow-lender
Version:
Contract to track the debt with partners that pay on a monthly basis, used by the Ensuro Protocol
2,105 lines • 130 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "CashFlowLender",
"sourceName": "contracts/CashFlowLender.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "trustedForwarder_",
"type": "address"
},
{
"internalType": "contract IPolicyPool",
"name": "policyPool_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"name": "AddressEmptyCode",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "balanceReduction",
"type": "uint256"
}
],
"name": "BalanceDecreasedOnResolve",
"type": "error"
},
{
"inputs": [],
"name": "CannotDeactivateTarget",
"type": "error"
},
{
"inputs": [],
"name": "CannotDeinvestYieldVault",
"type": "error"
},
{
"inputs": [],
"name": "CannotRefreshAssetWithCash",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "int256",
"name": "debtAfter",
"type": "int256"
}
],
"name": "CashOutExceedsLimit",
"type": "error"
},
{
"inputs": [
{
"internalType": "int256",
"name": "currentDebt",
"type": "int256"
},
{
"internalType": "uint96",
"name": "debtLimit",
"type": "uint96"
}
],
"name": "DebtLimitExceeded",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "implementation",
"type": "address"
}
],
"name": "ERC1967InvalidImplementation",
"type": "error"
},
{
"inputs": [],
"name": "ERC1967NonPayable",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "allowance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientAllowance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientBalance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "approver",
"type": "address"
}
],
"name": "ERC20InvalidApprover",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC20InvalidReceiver",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "ERC20InvalidSender",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "ERC20InvalidSpender",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "max",
"type": "uint256"
}
],
"name": "ERC4626ExceededMaxDeposit",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "max",
"type": "uint256"
}
],
"name": "ERC4626ExceededMaxMint",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "max",
"type": "uint256"
}
],
"name": "ERC4626ExceededMaxRedeem",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "max",
"type": "uint256"
}
],
"name": "ERC4626ExceededMaxWithdraw",
"type": "error"
},
{
"inputs": [],
"name": "FailedCall",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "InsufficientBalance",
"type": "error"
},
{
"inputs": [],
"name": "InvalidInitialization",
"type": "error"
},
{
"inputs": [],
"name": "InvalidPolicyPool",
"type": "error"
},
{
"inputs": [],
"name": "InvalidSlotSize",
"type": "error"
},
{
"inputs": [],
"name": "MustChangeYieldAssetBeforeRefresh",
"type": "error"
},
{
"inputs": [],
"name": "NotEnoughCash",
"type": "error"
},
{
"inputs": [],
"name": "NotInitializing",
"type": "error"
},
{
"inputs": [],
"name": "NothingToRefresh",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "OnlyPolicyPool",
"type": "error"
},
{
"inputs": [],
"name": "OutOfRangeAccess",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "int256",
"name": "debtAfter",
"type": "int256"
}
],
"name": "RepaymentExceedsLimit",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "bits",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "SafeCastOverflowedUintDowncast",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "SafeCastOverflowedUintToInt",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "SafeERC20FailedOperation",
"type": "error"
},
{
"inputs": [],
"name": "TargetAlreadyExists",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "enum CashFlowLender.TargetStatus",
"name": "status",
"type": "uint8"
}
],
"name": "TargetNotActive",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"name": "TargetNotFound",
"type": "error"
},
{
"inputs": [],
"name": "UUPSUnauthorizedCallContext",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "slot",
"type": "bytes32"
}
],
"name": "UUPSUnsupportedProxiableUUID",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "caller",
"type": "address"
},
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "bytes4",
"name": "requiredSelector",
"type": "bytes4"
}
],
"name": "UnauthorizedForward",
"type": "error"
},
{
"inputs": [],
"name": "YieldVaultIsRequired",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "oldAsset",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "newAsset",
"type": "address"
}
],
"name": "AssetChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "target",
"type": "address"
},
{
"indexed": false,
"internalType": "uint32",
"name": "slotSize",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint32",
"name": "slotIndex",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "int256",
"name": "debtAfterChange",
"type": "int256"
},
{
"indexed": false,
"internalType": "address",
"name": "destination",
"type": "address"
}
],
"name": "CashOutPayout",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "target",
"type": "address"
},
{
"indexed": false,
"internalType": "uint32",
"name": "slotSize",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint32",
"name": "slotIndex",
"type": "uint32"
},
{
"indexed": false,
"internalType": "int256",
"name": "value",
"type": "int256"
},
{
"indexed": false,
"internalType": "int256",
"name": "debtAfterChange",
"type": "int256"
},
{
"indexed": false,
"internalType": "int256",
"name": "totalDebtAfterChange",
"type": "int256"
}
],
"name": "DebtChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "assets",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "shares",
"type": "uint256"
}
],
"name": "Deposit",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint64",
"name": "version",
"type": "uint64"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "target",
"type": "address"
},
{
"indexed": false,
"internalType": "uint32",
"name": "slotSize",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint32",
"name": "slotIndex",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "int256",
"name": "debtAfterChange",
"type": "int256"
},
{
"indexed": false,
"internalType": "address",
"name": "payer",
"type": "address"
}
],
"name": "RepayDebt",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "target",
"type": "address"
},
{
"components": [
{
"internalType": "uint32",
"name": "slotSize",
"type": "uint32"
},
{
"internalType": "enum CashFlowLender.TargetStatus",
"name": "status",
"type": "uint8"
},
{
"internalType": "uint96",
"name": "debtLimit",
"type": "uint96"
},
{
"internalType": "uint96",
"name": "minLiquidity",
"type": "uint96"
}
],
"indexed": false,
"internalType": "struct CashFlowLender.TargetConfig",
"name": "config",
"type": "tuple"
}
],
"name": "TargetAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "target",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "oldDebtLimit",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newDebtLimit",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "oldMinLiquidity",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newMinLiquidity",
"type": "uint256"
}
],
"name": "TargetLimitsChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "target",
"type": "address"
},
{
"indexed": false,
"internalType": "uint32",
"name": "oldSlotSize",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint32",
"name": "newSlotSize",
"type": "uint32"
}
],
"name": "TargetSlotSizeChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "target",
"type": "address"
},
{
"indexed": false,
"internalType": "enum CashFlowLender.TargetStatus",
"name": "oldStatus",
"type": "uint8"
},
{
"indexed": false,
"internalType": "enum CashFlowLender.TargetStatus",
"name": "newStatus",
"type": "uint8"
}
],
"name": "TargetStatusChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "implementation",
"type": "address"
}
],
"name": "Upgraded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "assets",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "shares",
"type": "uint256"
}
],
"name": "Withdraw",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "contract IERC4626",
"name": "oldVault",
"type": "address"
},
{
"indexed": false,
"internalType": "contract IERC4626",
"name": "newVault",
"type": "address"
}
],
"name": "YieldVaultChanged",
"type": "event"
},
{
"inputs": [],
"name": "OWN_POLICY_SELECTOR",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "SLOTSIZE_CALENDAR_MONTH",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "UPGRADE_INTERFACE_VERSION",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint32",
"name": "slotSize",
"type": "uint32"
},
{
"internalType": "uint256",
"name": "debtLimit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minLiquidity",
"type": "uint256"
}
],
"name": "addTarget",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "asset",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint32",
"name": "slotSize",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "slotIndex",
"type": "uint32"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "destination",
"type": "address"
}
],
"name": "cashOutPayouts",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "cashWithdrawable",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
}
],
"name": "convertToAssets",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
}
],
"name": "convertToShares",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "currentDebt",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "deposit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "depositIntoYieldVault",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "forwardNewPolicy",
"outputs": [
{
"internalType": "bytes",
"name": "result",
"type": "bytes"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "bytes[]",
"name": "data",
"type": "bytes[]"
}
],
"name": "forwardNewPolicyBatch",
"outputs": [
{
"internalType": "bytes[]",
"name": "result",
"type": "bytes[]"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "forwardResolvePolicy",
"outputs": [
{
"internalType": "bytes",
"name": "result",
"type": "bytes"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "bytes[]",
"name": "data",
"type": "bytes[]"
}
],
"name": "forwardResolvePolicyBatch",
"outputs": [
{
"internalType": "bytes[]",
"name": "result",
"type": "bytes[]"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint32",
"name": "slotSize",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "slotIndex",
"type": "uint32"
}
],
"name": "getDebtForPeriod",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"name": "getTargetStatus",
"outputs": [
{
"internalType": "enum CashFlowLender.TargetStatus",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "name_",
"type": "string"
},
{
"internalType": "string",
"name": "symbol_",
"type": "string"
},
{
"internalType": "contract IERC4626",
"name": "yieldVault_",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "forwarder",
"type": "address"
}
],
"name": "isTrustedForwarder",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "bytes4",
"name": "selector",
"type": "bytes4"
}
],
"name": "makeFakeSelector",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "maxDeposit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "maxMint",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "maxRedeem",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "maxWithdraw",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "mint",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "onERC721Received",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "onPayoutReceived",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "onPolicyExpired",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "onPolicyReplaced",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "policyPool",
"outputs": [
{
"internalType": "contract IPolicyPool",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
}
],
"name": "previewDeposit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
}
],
"name": "previewMint",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
}
],
"name": "previewRedeem",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
}
],
"name": "previewWithdraw",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "proxiableUUID",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "redeem",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "refreshAsset",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint32",
"name": "slotSize",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "slotIndex",
"type": "uint32"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "repayDebt",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint256",
"name": "debtLimit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minLiquidity",
"type": "uint256"
}
],
"name": "setTargetLimits",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint32",
"name": "newSlotSize",
"type": "uint32"
}
],
"name": "setTargetSlotSize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "enum CashFlowLender.TargetStatus",
"name": "newStatus",
"type": "uint8"
}
],
"name": "setTargetStatus",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IERC4626",
"name": "yieldVault_",
"type": "address"
},
{
"internalType": "bool",
"name": "force",
"type": "bool"
}
],
"name": "setYieldVault",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalAssets",
"outputs": [
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "trustedForwarder",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newImplementation",
"type": "address"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "upgradeToAndCall",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "withdraw",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "withdrawFromYieldVault",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "yieldVault",
"outputs": [
{
"internalType": "contract IERC4626",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x60e06040523060a052348015610013575f5ffd5b5060405161550c38038061550c8339810160408190526100329161011a565b6001600160a01b03808316608052811660c05261004d610054565b5050610152565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a45760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101035780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6001600160a01b0381168114610103575f5ffd5b5f5f6040838503121561012b575f5ffd5b825161013681610106565b602084015190925061014781610106565b809150509250929050565b60805160a05160c0516153206101ec5f395f818161069101528181610fe201528181611440015281816115c201528181611e2a015281816120c7015281816121570152818161237c0152818161273e015281816127f701528181612b950152818161388d015261392201525f818161338e015281816133b701526134da01525f81816106f8015281816107bd01526139f801526153205ff3fe60806040526004361061037c575f3560e01c806382dbbd71116101d3578063c0c51217116100fd578063d6281d3e1161009d578063e8e617b71161006d578063e8e617b714610ad6578063ee07abbb14610af5578063ef8b30f7146109c8578063f7a3933314610b14575f5ffd5b8063d6281d3e14610a4d578063d905777e14610a6c578063dd62ed3e14610a8b578063e77659fd14610aaa575f5ffd5b8063c8030873116100d8578063c8030873146109e7578063cc671a18146109fb578063ce96cb7714610a0f578063d336078c14610a2e575f5ffd5b8063c0c51217146109a9578063c63d75b614610663578063c6e6f592146109c8575f5ffd5b8063a9ed148711610173578063b460af9411610143578063b460af941461092d578063ba0876521461094c578063bdb5371d1461096b578063bfdb20da1461098a575f5ffd5b8063a9ed1487146108a4578063ac860f74146108bf578063ad3cb1cc146108de578063b3d7f6b91461090e575f5ffd5b806395d89b41116101ae57806395d89b411461083e578063a3ac939014610852578063a7f8a5e214610871578063a9059cbb14610885575f5ffd5b806382dbbd71146107e157806386b440831461080057806394bf804d1461081f575f5ffd5b8063313ce567116102b45780634f1ef286116102545780636e553f65116102245780636e553f651461074757806370a0823114610766578063759076e5146107855780637da0a877146107af575f5ffd5b80634f1ef286146106b557806352d1902d146106c8578063572b6c05146106dc5780635ee0c7dd14610728575f5ffd5b80633edeb2571161028f5780633edeb25714610637578063402d267d146106635780634cdad506146104185780634d15eb0314610683575f5ffd5b8063313ce567146105c657806333bded3c146105ec57806338d52e0f1461060b575f5ffd5b8063095ea7b31161031f57806318160ddd116102fa57806318160ddd14610536578063194448e514610569578063225c531e1461058857806323b872dd146105a7575f5ffd5b8063095ea7b3146104c05780630a28a477146104df578063150b7a02146104fe575f5ffd5b8063077f224a1161035a578063077f224a146103f757806307a2d13a1461041857806308742d9014610437578063091ea8a614610456575f5ffd5b806301e1d1141461038057806301ffc9a7146103a757806306fdde03146103d6575b5f5ffd5b34801561038b575f5ffd5b50610394610b33565b6040519081526020015b60405180910390f35b3480156103b2575f5ffd5b506103c66103c13660046144be565b610c75565b604051901515815260200161039e565b3480156103e1575f5ffd5b506103ea610d32565b60405161039e9190614505565b348015610402575f5ffd5b506104166104113660046145d2565b610df2565b005b348015610423575f5ffd5b50610394610432366004614648565b610f02565b348015610442575f5ffd5b50610416610451366004614670565b610f0d565b348015610461575f5ffd5b506104b36104703660046146a7565b6001600160a01b03165f9081527f0dff660c705ec490383ffafc9e8e3ab4714559f9ec8567c5380d4ad2dff5af016020526040902054600160201b900460ff1690565b60405161039e91906146f6565b3480156104cb575f5ffd5b506103c66104da366004614704565b610fa9565b3480156104ea575f5ffd5b506103946104f9366004614648565b610fca565b348015610509575f5ffd5b5061051d610518366004614772565b610fd6565b6040516001600160e01b0319909116815260200161039e565b348015610541575f5ffd5b507f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0254610394565b348015610574575f5ffd5b506104166105833660046147ec565b611045565b348015610593575f5ffd5b506104166105a2366004614818565b611168565b3480156105b2575f5ffd5b506103c66105c136600461487c565b61128c565b3480156105d1575f5ffd5b506105da6112bb565b60405160ff909116815260200161039e565b3480156105f7575f5ffd5b506103ea6106063660046148ba565b6112e4565b348015610616575f5ffd5b5061061f61156a565b6040516001600160a01b03909116815260200161039e565b348015610642575f5ffd5b5061064e63ffffffff81565b60405163ffffffff909116815260200161039e565b34801561066e575f5ffd5b5061039461067d3660046146a7565b505f1990565b34801561068e575f5ffd5b507f000000000000000000000000000000000000000000000000000000000000000061061f565b6104166106c336600461490a565b611585565b3480156106d3575f5ffd5b5061039461159b565b3480156106e7575f5ffd5b506103c66106f63660046146a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b348015610733575f5ffd5b5061051d610742366004614969565b6115b6565b348015610752575f5ffd5b506103946107613660046149ac565b61161f565b348015610771575f5ffd5b506103946107803660046146a7565b611649565b348015610790575f5ffd5b505f5160206152ab5f395f51905f5254600160a01b9004600b0b610394565b3480156107ba575f5ffd5b507f000000000000000000000000000000000000000000000000000000000000000061061f565b3480156107ec575f5ffd5b506104166107fb3660046149cf565b61166f565b34801561080b575f5ffd5b506103ea61081a3660046148ba565b611762565b34801561082a575f5ffd5b506103946108393660046149ac565b611883565b348015610849575f5ffd5b506103ea6118a5565b34801561085d575f5ffd5b5061039461086c366004614a1d565b6118e3565b34801561087c575f5ffd5b5061061f611937565b348015610890575f5ffd5b506103c661089f366004614704565b611956565b3480156108af575f5ffd5b5061051d6001600160e01b031981565b3480156108ca575f5ffd5b506104166108d9366004614648565b61196d565b3480156108e9575f5ffd5b506103ea604051806040016040528060058152602001640352e302e360dc1b81525081565b348015610919575f5ffd5b50610394610928366004614648565b611a32565b348015610938575f5ffd5b50610394610947366004614a5a565b611a3e565b348015610957575f5ffd5b50610394610966366004614a5a565b611a9b565b348015610976575f5ffd5b50610416610985366004614a8e565b611aef565b348015610995575f5ffd5b506104166109a4366004614ac0565b611bd9565b3480156109b4575f5ffd5b5061051d6109c3