@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
2,220 lines (2,219 loc) • 3.08 MB
JSON
{
"abi": [
{
"inputs": [
{
"internalType": "bytes32",
"name": "name",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "sumOfSumInsuredCap",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sumInsuredPercentage",
"type": "uint256"
},
{
"internalType": "address",
"name": "erc20Token",
"type": "address"
},
{
"internalType": "address",
"name": "wallet",
"type": "address"
},
{
"internalType": "address",
"name": "registry",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "allowAccount",
"type": "bool"
}
],
"name": "LogAllowAccountSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bool",
"name": "allowAllAccounts",
"type": "bool"
}
],
"name": "LogAllowAllAccountsSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "index",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "maxAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
}
],
"name": "LogBasicRiskpoolCandidateBundleAmountCheck",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "activeBundles",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "policies",
"type": "uint256"
}
],
"name": "LogBasicRiskpoolCapitalCheck",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "activeBundles",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "capital",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "lockedCapital",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "capacityIsAvailable",
"type": "bool"
}
],
"name": "LogBasicRiskpoolCapitalization",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleCapitalNew",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "bundleCapitalOld",
"type": "uint256"
}
],
"name": "LogBundleCapitalSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "lifetime",
"type": "uint256"
}
],
"name": "LogBundleExpired",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "lifetime",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "lifetimeExtended",
"type": "uint256"
}
],
"name": "LogBundleExtended",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "sumInsuredOk",
"type": "bool"
},
{
"indexed": false,
"internalType": "bool",
"name": "durationOk",
"type": "bool"
},
{
"indexed": false,
"internalType": "bool",
"name": "premiumOk",
"type": "bool"
}
],
"name": "LogBundleMatchesApplication",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "bundleIdRequested",
"type": "uint256"
}
],
"name": "LogBundleMismatch",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentApproved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentArchived",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "componentName",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "enum IComponent.ComponentType",
"name": "componentType",
"type": "uint8"
},
{
"indexed": false,
"internalType": "address",
"name": "componentAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "registryAddress",
"type": "address"
}
],
"name": "LogComponentCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentDeclined",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentPaused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "componentName",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "enum IComponent.ComponentType",
"name": "componentType",
"type": "uint8"
},
{
"indexed": false,
"internalType": "address",
"name": "componentAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentProposed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentResumed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"indexed": false,
"internalType": "enum IComponent.ComponentState",
"name": "stateOld",
"type": "uint8"
},
{
"indexed": false,
"internalType": "enum IComponent.ComponentState",
"name": "stateNew",
"type": "uint8"
}
],
"name": "LogComponentStateChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentSuspended",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentUnpaused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "numberOfBundles",
"type": "uint256"
}
],
"name": "LogMaximumNumberOfActiveBundlesSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogRiskpoolApproved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "LogRiskpoolBundleBurned",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "LogRiskpoolBundleClosed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogRiskpoolBundleCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogRiskpoolBundleDefunded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogRiskpoolBundleFunded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "LogRiskpoolBundleLocked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "isMatching",
"type": "bool"
}
],
"name": "LogRiskpoolBundleMatchesPolicy",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "LogRiskpoolBundleUnlocked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "poolCapitalNew",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "poolCapitalOld",
"type": "uint256"
}
],
"name": "LogRiskpoolCapitalSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "isSecured",
"type": "bool"
}
],
"name": "LogRiskpoolCollateralLocked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
}
],
"name": "LogRiskpoolCollateralReleased",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "riskpoolAddress",
"type": "address"
}
],
"name": "LogRiskpoolCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogRiskpoolDeclined",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogRiskpoolPayoutProcessed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogRiskpoolPremiumProcessed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogRiskpoolProposed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [],
"name": "APR_100_PERCENTAGE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DEFAULT_FILTER_DATA_STRUCTURE",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "EMPTY_STRING_HASH",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "EXTENSION_INTERVAL",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "FULL_COLLATERALIZATION_LEVEL",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_APR",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_BUNDLE_LIFETIME",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_POLICY_COVERAGE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_POLICY_DURATION",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_BUNDLE_LIFETIME",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_POLICY_COVERAGE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_POLICY_DURATION",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ONE_YEAR_DURATION",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "activeBundles",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "approvalCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "archiveCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "enum IBundle.BundleState",
"name": "state",
"type": "uint8"
},
{
"internalType": "bytes",
"name": "filter",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "capital",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lockedCapital",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"internalType": "struct IBundle.Bundle",
"name": "bundle",
"type": "tuple"
},
{
"components": [
{
"internalType": "enum IPolicy.ApplicationState",
"name": "state",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "premiumAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sumInsuredAmount",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"internalType": "struct IPolicy.Application",
"name": "application",
"type": "tuple"
}
],
"name": "bundleMatchesApplication",
"outputs": [
{
"internalType": "bool",
"name": "isMatching",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "enum IBundle.BundleState",
"name": "state",
"type": "uint8"
},
{
"internalType": "bytes",
"name": "filter",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "capital",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lockedCapital",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"internalType": "struct IBundle.Bundle",
"name": "bundle",
"type": "tuple"
},
{
"components": [
{
"internalType": "enum IPolicy.ApplicationState",
"name": "state",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "premiumAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sumInsuredAmount",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"internalType": "struct IPolicy.Application",
"name": "application",
"type": "tuple"
}
],
"name": "bundleMatchesApplication2",
"outputs": [
{
"internalType": "bool",
"name": "isMatching",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "bundles",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "burnBundle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "sumInsured",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "annualPercentageReturn",
"type": "uint256"
}
],
"name": "calculatePremium",
"outputs": [
{
"internalType": "uint256",
"name": "premiumAmount",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "protectedBalance",
"type": "uint256"
}
],
"name": "calculateSumInsured",
"outputs": [
{
"internalType": "uint256",
"name": "sumInsured",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "closeBundle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
}
],
"name": "collateralizePolicy",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "uint256",
"name": "lifetime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "policyMinProtectedBalance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "policyMaxProtectedBalance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "policyMinDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "policyMaxDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "annualPercentageReturn",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "initialAmount",
"type": "uint256"
}
],
"name": "createBundle",
"outputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "filter",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "initialAmount",
"type": "uint256"
}
],
"name": "createBundle",
"outputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "declineCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "decodeApplicationParameterFromData",
"outputs": [
{
"internalType": "address",
"name": "wallet",
"type": "address"
},
{
"internalType": "uint256",
"name": "protectedBalance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxPremium",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "filter",
"type": "bytes"
}
],
"name": "decodeBundleParamsFromFilter",
"outputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "uint256",
"name": "lifetime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minSumInsured",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxSumInsured",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "annualPercentageReturn",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "defundBundle",
"outputs": [
{
"internalType": "uint256",
"name": "netAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "depegPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "targetPrice",
"type": "uint256"
}
],
"name": "depegPriceIsBelowProtectedDepegPrice",
"outputs": [
{
"internalType": "bool",
"name": "isBelowProtectedPrice",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minSumInsured",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxSumInsured",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "annualPercentageReturn",
"type": "uint256"
},
{
"components": [
{
"internalType": "enum IPolicy.ApplicationState",
"name": "state",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "premiumAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sumInsuredAmount",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"internalType": "struct IPolicy.Application",
"name": "application",
"type": "tuple"
}
],
"name": "detailedBundleApplicationMatch",
"outputs": [
{
"internalType": "bool",
"name": "isMatching",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "wallet",
"type": "address"
},
{
"internalType": "uint256",
"name": "protectedBalance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxPremium",
"type": "uint256"
}
],
"name": "encodeApplicationParameterAsData",
"outputs": [
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "uint256",
"name": "lifetime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minSumInsured",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxSumInsured",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "annualPercentageReturn",
"type": "uint256"
}
],
"name": "encodeBundleParamsAsFilter",
"outputs": [
{
"internalType": "bytes",
"name": "filter",
"type": "bytes"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lifetimeExtension",
"type": "uint256"
}
],
"name": "extendBundleLifetime",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "fundBundle",
"outputs": [
{
"internalType": "uint256",
"name": "netAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idx",
"type": "uint256"
}
],
"name": "getActiveBundleId",
"outputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getActiveBundleIds",
"outputs": [
{
"internalType": "uint256[]",
"name": "activeBundleIds",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "getActivePolicies",
"outputs": [
{
"internalType": "uint256",
"name": "activePolicies",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getApr100PercentLevel",
"outputs": [
{
"internalType": "uint256",
"name": "apr100PercentLevel",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getBalance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idx",
"type": "uint256"
}
],
"name": "getBundle",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "enum IBundle.BundleState",
"name": "state",
"type": "uint8"
},
{
"internalType": "bytes",
"name": "filter",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "capital",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lockedCapital",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"internalType": "struct IBundle.Bundle",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getBundleCapitalCap",
"outputs": [
{
"internalType": "uint256",
"name": "bundleCapitalCap",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "getBundleFilter",
"outputs": [
{
"internalType": "bytes",
"name": "filter",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idx",
"type": "uint256"
}
],
"name": "getBundleId",
"outputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "getBundleInfo",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "enum IBundle.BundleState",
"name": "state",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "lifetime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minSumInsured",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxSumInsured",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "annualPercentageReturn",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "capitalSupportedByStaking",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "capital",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lockedCapital",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
}
],
"internalType": "struct DepegRiskpool.BundleInfo",
"name": "info",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "getBundleLifetimeData",
"outputs": [
{
"internalType": "enum IBundle.BundleState",
"name": "state",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lifetime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "extendedLifetime",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isExpired",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getCapacity",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getCapital",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getChainRegistry",
"outputs": [
{
"internalType": "contract IChainRegistryFacade",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getCollateralizationLevel",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getErc20Token",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getFilterDataStructure",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getFullCollateralizationLevel",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getMaxBundleLifetime",
"outputs": [
{
"internalType": "uint256",
"name": "maxBundleLifetime",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getMaximumNumberOfActiveBundles",
"outputs": [
{
"internalType": "uint256",
"name": "maximumNumberOfActiveBundles",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getName",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "getNftId",