@ensuro/core
Version:
Ensuro - Blockchain-based insurance protocol
1,915 lines • 125 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "EToken",
"sourceName": "contracts/EToken.sol",
"abi": [
{
"inputs": [
{
"internalType": "contract IPolicyPool",
"name": "policyPool_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"name": "AddressEmptyCode",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "borrower",
"type": "address"
}
],
"name": "BorrowerAlreadyAdded",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "DepositNotWhitelisted",
"type": "error"
},
{
"inputs": [],
"name": "ECDSAInvalidSignature",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "length",
"type": "uint256"
}
],
"name": "ECDSAInvalidSignatureLength",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "ECDSAInvalidSignatureS",
"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": "uint256",
"name": "deadline",
"type": "uint256"
}
],
"name": "ERC2612ExpiredSignature",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "signer",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "ERC2612InvalidSigner",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "requested",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxWithdraw",
"type": "uint256"
}
],
"name": "ExceedsMaxWithdraw",
"type": "error"
},
{
"inputs": [],
"name": "FailedCall",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "currentNonce",
"type": "uint256"
}
],
"name": "InvalidAccountNonce",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "borrower",
"type": "address"
}
],
"name": "InvalidBorrower",
"type": "error"
},
{
"inputs": [
{
"internalType": "contract ICooler",
"name": "cooler",
"type": "address"
}
],
"name": "InvalidCooler",
"type": "error"
},
{
"inputs": [],
"name": "InvalidInitialization",
"type": "error"
},
{
"inputs": [
{
"internalType": "enum IEToken.Parameter",
"name": "parameter",
"type": "uint8"
}
],
"name": "InvalidParameter",
"type": "error"
},
{
"inputs": [
{
"internalType": "contract ILPWhitelist",
"name": "whitelist",
"type": "address"
}
],
"name": "InvalidWhitelist",
"type": "error"
},
{
"inputs": [],
"name": "InvalidYieldVault",
"type": "error"
},
{
"inputs": [],
"name": "NoZeroPolicyPool",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "required",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "available",
"type": "uint256"
}
],
"name": "NotEnoughCash",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "required",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "available",
"type": "uint256"
}
],
"name": "NotEnoughScrFunds",
"type": "error"
},
{
"inputs": [],
"name": "NotInitializing",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "caller",
"type": "address"
}
],
"name": "OnlyBorrower",
"type": "error"
},
{
"inputs": [],
"name": "OnlyPolicyPool",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ReserveInvalidReceiver",
"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": [
{
"internalType": "uint256",
"name": "rejectedScale",
"type": "uint256"
}
],
"name": "ScaleTooSmall",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "from_",
"type": "address"
},
{
"internalType": "address",
"name": "to_",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "TransferNotWhitelisted",
"type": "error"
},
{
"inputs": [],
"name": "UUPSUnauthorizedCallContext",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "slot",
"type": "bytes32"
}
],
"name": "UUPSUnsupportedProxiableUUID",
"type": "error"
},
{
"inputs": [],
"name": "UpgradeCannotChangePolicyPool",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "actualUtilization",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minUtilization",
"type": "uint256"
}
],
"name": "UtilizationRateTooLow",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "WithdrawalNotWhitelisted",
"type": "error"
},
{
"inputs": [
{
"internalType": "contract ICooler",
"name": "cooler",
"type": "address"
}
],
"name": "WithdrawalsRequireCooldown",
"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": true,
"internalType": "uint256",
"name": "policyId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "CoCRefunded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "contract ICooler",
"name": "oldCooler",
"type": "address"
},
{
"indexed": false,
"internalType": "contract ICooler",
"name": "newCooler",
"type": "address"
}
],
"name": "CoolerChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "EIP712DomainChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "distributedProfit",
"type": "uint256"
}
],
"name": "ETokensRedistributed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "int256",
"name": "earnings",
"type": "int256"
}
],
"name": "EarningsRecorded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "contract IERC4626",
"name": "oldVault",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "shares",
"type": "uint256"
}
],
"name": "ErrorIgnoredDeinvestingVault",
"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": "borrower",
"type": "address"
}
],
"name": "InternalBorrowerAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "borrower",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "defaultedDebt",
"type": "uint256"
}
],
"name": "InternalBorrowerRemoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "borrower",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amountAsked",
"type": "uint256"
}
],
"name": "InternalLoan",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "borrower",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "InternalLoanRepaid",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "enum IEToken.Parameter",
"name": "param",
"type": "uint8"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newValue",
"type": "uint256"
}
],
"name": "ParameterChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "policyId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "interestRate",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "SCRLocked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "policyId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "interestRate",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"internalType": "int256",
"name": "adjustment",
"type": "int256"
}
],
"name": "SCRUnlocked",
"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": false,
"internalType": "contract ILPWhitelist",
"name": "oldWhitelist",
"type": "address"
},
{
"indexed": false,
"internalType": "contract ILPWhitelist",
"name": "newWhitelist",
"type": "address"
}
],
"name": "WhitelistChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "contract IERC4626",
"name": "oldVault",
"type": "address"
},
{
"indexed": true,
"internalType": "contract IERC4626",
"name": "newVault",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "forced",
"type": "bool"
}
],
"name": "YieldVaultChanged",
"type": "event"
},
{
"inputs": [],
"name": "DOMAIN_SEPARATOR",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "UPGRADE_INTERFACE_VERSION",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "borrower",
"type": "address"
}
],
"name": "addBorrower",
"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": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "cooler",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "currency",
"outputs": [
{
"internalType": "contract IERC20Metadata",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "caller",
"type": "address"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "deposit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "depositIntoYieldVault",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "eip712Domain",
"outputs": [
{
"internalType": "bytes1",
"name": "fields",
"type": "bytes1"
},
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "version",
"type": "string"
},
{
"internalType": "uint256",
"name": "chainId",
"type": "uint256"
},
{
"internalType": "address",
"name": "verifyingContract",
"type": "address"
},
{
"internalType": "bytes32",
"name": "salt",
"type": "bytes32"
},
{
"internalType": "uint256[]",
"name": "extensions",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "fundsAvailable",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "fundsAvailableToLock",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bool",
"name": "updated",
"type": "bool"
}
],
"name": "getCurrentScale",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "borrower",
"type": "address"
}
],
"name": "getLoan",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
}
],
"name": "getScaledUserBalanceAndSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "name_",
"type": "string"
},
{
"internalType": "string",
"name": "symbol_",
"type": "string"
},
{
"internalType": "uint256",
"name": "maxUtilizationRate_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "internalLoanInterestRate_",
"type": "uint256"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "internalLoan",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "internalLoanInterestRate",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "investedInYV",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "liquidityRequirement",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "policyId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "scrAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "policyInterestRate",
"type": "uint256"
}
],
"name": "lockScr",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "maxNegativeAdjustment",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxUtilizationRate",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "minUtilizationRate",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "nonces",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "permit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "policyPool",
"outputs": [
{
"internalType": "contract IPolicyPool",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "proxiableUUID",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "recordEarnings",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "redistribute",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "borrower",
"type": "address"
}
],
"name": "removeBorrower",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "onBehalfOf",
"type": "address"
}
],
"name": "repayLoan",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
}
],
"name": "scaledBalanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "scaledTotalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "scr",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "scrInterestRate",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract ICooler",
"name": "newCooler",
"type": "address"
}
],
"name": "setCooler",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "enum IEToken.Parameter",
"name": "param",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "newValue",
"type": "uint256"
}
],
"name": "setParam",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract ILPWhitelist",
"name": "lpWhitelist_",
"type": "address"
}
],
"name": "setWhitelist",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IERC4626",
"name": "newYieldVault",
"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": "tokenInterestRate",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalWithdrawable",
"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": [
{
"internalType": "uint256",
"name": "policyId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "scrAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "policyInterestRate",
"type": "uint256"
},
{
"internalType": "int256",
"name": "adjustment",
"type": "int256"
}
],
"name": "unlockScr",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "policyId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "scrAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "policyInterestRate",
"type": "uint256"
},
{
"internalType": "int256",
"name": "adjustment",
"type": "int256"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "uint256",
"name": "refundAmount",
"type": "uint256"
}
],
"name": "unlockScrWithRefund",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newImplementation",
"type": "address"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "upgradeToAndCall",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "utilizationRate",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "whitelist",
"outputs": [
{
"internalType": "contract ILPWhitelist",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "caller",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "withdraw",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "withdrawFromYieldVault",
"outputs": [
{
"internalType": "uint256",
"name": "deinvested",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "yieldVault",
"outputs": [
{
"internalType": "contract IERC4626",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x60c060405230608052348015610013575f5ffd5b506040516153a03803806153a083398101604081905261003291610129565b80806001600160a01b03811661005b57604051636b23cf0160e01b815260040160405180910390fd5b610063610077565b6001600160a01b031660a052506101569050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100c75760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101265780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610139575f5ffd5b81516001600160a01b038116811461014f575f5ffd5b9392505050565b60805160a0516151dc6101c45f395f818161059e01528181610ee7015281816111a10152818161139601528181611a0501528181611bde0152818161254f015281816128d9015281816129e20152613f6501525f81816131460152818161316f01526134e001526151dc5ff3fe608060405260043610610371575f3560e01c80637d919a97116101c8578063ad3cb1cc116100fd578063d17e6c931161009d578063dfcb48bd1161006d578063dfcb48bd146109ce578063e3a8e29c146109e2578063e5a6b10f14610a01578063ee01a18314610a15575f5ffd5b8063d17e6c9314610952578063d336078c14610971578063d505accf14610990578063dd62ed3e146109af575f5ffd5b8063c1cca2b3116100d8578063c1cca2b3146108e3578063c3df9dac14610902578063cda4bcc214610921578063cf6a9a9414610935575f5ffd5b8063ad3cb1cc14610882578063b1bf962d146108b2578063ba4e8df5146108cf575f5ffd5b80639d90724d11610168578063a227dc4111610143578063a227dc4114610808578063a7f8a5e214610827578063a9059cbb14610844578063ac860f7414610863575f5ffd5b80639d90724d146107b1578063a08f2203146107d5578063a0ce552d146107e9575f5ffd5b8063854cff2f116101a3578063854cff2f14610742578063918344d31461076157806393e59dc11461078057806395d89b411461079d575f5ffd5b80637d919a97146106e85780637ecebe00146106fc57806384b0196e1461071b575f5ffd5b806333481fc9116102a95780634ffcda8c116102495780636fe0e395116102195780636fe0e3951461066c57806370a082311461068b57806376c7fc55146106aa57806379d989fb146106c9575f5ffd5b80634ffcda8c1461061157806352d1902d146106305780636c321c8a146106445780636c6f454214610658575f5ffd5b80634d15eb03116102845780634d15eb03146105905780634eb978a4146105d65780634f1ef286146105ea5780634fe0bd1e146105fd575f5ffd5b806333481fc91461053e5780633644e5151461055d5780633ad2820b14610571575f5ffd5b806318160ddd1161031457806323b872dd116102ef57806323b872dd146104bb57806323e103a8146104da5780632e2d2984146104f9578063313ce56714610518575f5ffd5b806318160ddd14610467578063194448e51461047b5780631da24f3e1461049c575f5ffd5b8063095ea7b31161034f578063095ea7b3146103ec5780630afbcdc91461040b578063159ec2df1461043f57806316db000f14610453575f5ffd5b806301ffc9a7146103755780630600a865146103a957806306fdde03146103cb575b5f5ffd5b348015610380575f5ffd5b5061039461038f36600461485b565b610a29565b60405190151581526020015b60405180910390f35b3480156103b4575f5ffd5b506103bd610a8a565b6040519081526020016103a0565b3480156103d6575f5ffd5b506103df610ae5565b6040516103a091906148b0565b3480156103f7575f5ffd5b506103946104063660046148d6565b610b8a565b348015610416575f5ffd5b5061042a610425366004614900565b610ba1565b604080519283526020830191909152016103a0565b34801561044a575f5ffd5b506103bd610bc3565b34801561045e575f5ffd5b506103bd610c02565b348015610472575f5ffd5b506103bd610c24565b348015610486575f5ffd5b5061049a610495366004614928565b610c52565b005b3480156104a7575f5ffd5b506103bd6104b6366004614900565b610eac565b3480156104c6575f5ffd5b506103946104d536600461495f565b610eb6565b3480156104e5575f5ffd5b506103bd6104f436600461499d565b610edb565b348015610504575f5ffd5b5061049a6105133660046149ed565b611196565b348015610523575f5ffd5b5061052c611393565b60405160ff90911681526020016103a0565b348015610549575f5ffd5b506103bd610558366004614900565b611473565b348015610568575f5ffd5b506103bd6114f5565b34801561057c575f5ffd5b5061049a61058b366004614a2c565b6114fe565b34801561059b575f5ffd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020016103a0565b3480156105e1575f5ffd5b5061049a6115a4565b61049a6105f8366004614b08565b6116d4565b348015610608575f5ffd5b506103bd6116f3565b34801561061c575f5ffd5b5061049a61062b366004614b68565b611707565b34801561063b575f5ffd5b506103bd61186a565b34801561064f575f5ffd5b506103bd611885565b348015610663575f5ffd5b506103bd6118b6565b348015610677575f5ffd5b5061049a610686366004614baf565b6118c9565b348015610696575f5ffd5b506103bd6106a5366004614900565b6119e1565b3480156106b5575f5ffd5b5061049a6106c4366004614900565b6119fa565b3480156106d4575f5ffd5b506103bd6106e3366004614c23565b611ade565b3480156106f3575f5ffd5b506032546103bd565b348015610707575f5ffd5b506103bd610716366004614900565b611b18565b348015610726575f5ffd5b5061072f611b22565b6040516103a09796959493929190614c3e565b34801561074d575f5ffd5b5061049a61075c366004614900565b611bcb565b34801561076c575f5ffd5b5061049a61077b366004614cd4565b611d06565b34801561078b575f5ffd5b506067546001600160a01b03166105be565b3480156107a8575f5ffd5b506103df611e50565b3480156107bc575f5ffd5b50606554600160801b90046001600160801b03166103bd565b3480156107e0575f5ffd5b506103bd611e8e565b3480156107f4575f5ffd5b5061049a610803366004614cf7565b611f81565b348015610813575f5ffd5b5061049a610822366004614d0e565b611fd4565b348015610832575f5ffd5b506068546001600160a01b03166105be565b34801561084f575f5ffd5b5061039461085e3660046148d6565b612026565b34801561086e575f5ffd5b5061049a61087d366004614cf7565b612033565b34801561088d575f5ffd5b506103df604051806040016040528060058152602001640352e302e360dc1b81525081565b3480156108bd575f5ffd5b506064546001600160801b03166103bd565b3480156108da575f5ffd5b506103bd6121b9565b3480156108ee575f5ffd5b5061049a6108fd366004614d3d565b6121d2565b34801561090d575f5ffd5b506103bd61091c366004614cd4565b6123d6565b34801561092c575f5ffd5b506103bd612523565b348015610940575f5ffd5b506069546001600160a01b03166105be565b34801561095d575f5ffd5b5061049a61096c366004614900565b61253c565b34801561097c575f5ffd5b506103bd61098b366004614cf7565b612677565b34801561099b575f5ffd5b5061049a6109aa366004614d6a565b612717565b3480156109ba575f5ffd5b506103bd6109c9366004614dd6565b61286c565b3480156109d9575f5ffd5b506103bd6128b5565b3480156109ed575f5ffd5b5061049a6109fc366004614900565b6128ce565b348015610a0c575f5ffd5b506105be6129df565b348015610a20575f5ffd5b506103bd612a60565b5f610a3382612a79565b80610a4e57506001600160e01b031982166336372b0760e01b145b80610a6957506001600160e01b0319821663a219a02560e01b145b80610a8457506001600160e01b03198216636d5136b160e11b145b92915050565b5f5f610ab9610a976121b9565b670de0b6b3a7640000610ab26065546001600160801b031690565b9190612aae565b90505f610ac4610c24565b905081811015610ad4575f610ade565b610ade8282614e16565b9250505090565b60605f5f5160206151475f395f51905f525b9050806003018054610b0890614e29565b80601f0160208091040260200160405190810160405280929190818152602001828054610b3490614e29565b8015610b7f5780601f10610b5657610100808354040283529160200191610b7f565b820191905f5260205f20905b815481529060010190602001808311610b6257829003601f168201915b505050505091505090565b5f33610b97818585612b5e565b5060019392505050565b5f5f610bac83612b6b565b60645490946001600160801b039091169350915050565b5f5f610bcd610c24565b90508015610bfa57606554610bf5906001600160801b03600160801b82048116911683612aae565b610bfc565b5f5b91505090565b5f610c0d6064612b9b565b610c15610c24565b610c1f9190614e16565b905090565b606480545f91610c1f916001600160801b031690610c43906065612bbe565b6001600160601b031690612c3a565b5f5f610c5c6129df565b90506001600160a01b0384161580610ce45750806001600160a01b0316846001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cb5573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cd99190614e61565b6001600160a01b0316145b610d0157604051638959269160e01b815260040160405180910390fd5b5f610d146068546001600160a01b031690565b90505f6001600160a01b03821615610e29576040516370a0823160e01b81523060048201525f906001600160a01b038416906370a0823190602401602060405180830381865afa158015610d6a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d8e9190614e7c565b90508015610e27578515610daf57610da68382612c58565b95509150610e27565b604051635d043b2960e11b815260048101829052306024820181905260448201526001600160a01b0384169063ba087652906064016020604051808303815f875af1158015610e00573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e249190614e7c565b91505b505b606880546001600160a01b0319166001600160a01b038816179055610e5a60325482610e559190614e93565b612d9b565b5f60325560405184151581526001600160a01b0380881691908416907f243f9479bbdaf9f3395e726975293ee3724f3819f4322a018c98afb9de70a1e0906020015b60405180910390a3505050505050565b5f610a8482612b6b565b5f33610ec3858285612db0565b610ece858585612e0e565b60019150505b9392505050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f255760405163799e780f60e01b815260040160405180910390fd5b5f610f386068546001600160a01b031690565b6001600160a01b031614610f4e57610f4e6115a4565b5f610f68610f5b856119e1565b610f63610a8a565b612e6b565b90505f198603610f76578095505b855f03610f86575f91505061118e565b6069546001600160a01b03161580610fab57506069546001600160a01b038681169116145b8061102d5750606954604051632e704af760e11b81526001600160a01b0390911690635ce095ee90610fe590309088908b90600401614eb2565b602060405180830381865afa158015611000573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110249190614ed6565b64ffffffffff16155b6069546001600160a01b03169061106857604051632bc34ba360e01b81526001600160a01b0390911660048201526024015b60405180910390fd5b508581808211156110955760405163087da9fd60e01b81526004810192909252602482015260440161105f565b50506067546001600160a01b0316158061111d5750606754604051639051c76360e01b81526001600160a01b0390911690639051c763906110de90309088908b90600401614eb2565b602060405180830381865afa1580156110f9573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061111d9190614efa565b8487909161114f5760405163d38a933960e01b81526001600160a01b039092166004830152602482015260440161105f565b5050836001600160a01b0316856001600160a01b03161461117557611175848688612db0565b61117f8487612e7a565b6111898387612eae565b859150505b949350505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146111df5760405163799e780f60e01b815260040160405180910390fd5b6067546001600160a01b0316158061130857506067546040516337ee20dd60e01b81526001600160a01b03909116906337ee20dd9061122690309086908890600401614eb2565b602060405180830381