@etherisc/gif-contracts
Version:
This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.
2,200 lines • 2.47 MB
JSON
{
"abi": [
{
"inputs": [
{
"internalType": "bytes32",
"name": "productName",
"type": "bytes32"
},
{
"internalType": "address",
"name": "registry",
"type": "address"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "oracleId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"internalType": "address",
"name": "insurer",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "policyId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "claimId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "payoutAmount",
"type": "uint256"
}
],
"name": "LogAyiiClaimCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "policyId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "payoutAmount",
"type": "uint256"
}
],
"name": "LogAyiiPayoutCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "policyId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "address",
"name": "policyHolder",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "premiumAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "sumInsuredAmount",
"type": "uint256"
}
],
"name": "LogAyiiPolicyApplicationCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "policyId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "address",
"name": "policyHolder",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "premiumAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "sumInsuredAmount",
"type": "uint256"
}
],
"name": "LogAyiiPolicyCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "policyId",
"type": "bytes32"
}
],
"name": "LogAyiiPolicyProcessed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "trigger",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "exit",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tsi",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "aph",
"type": "uint256"
}
],
"name": "LogAyiiRiskDataAfterAdjustment",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "trigger",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "exit",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tsi",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "aph",
"type": "uint256"
}
],
"name": "LogAyiiRiskDataBeforeAdjustment",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "productId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "uaiId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "cropId",
"type": "bytes32"
}
],
"name": "LogAyiiRiskDataCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "requestId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "aaay",
"type": "uint256"
}
],
"name": "LogAyiiRiskDataReceived",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "requestId",
"type": "uint256"
}
],
"name": "LogAyiiRiskDataRequestCancelled",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "requestId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "projectId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "uaiId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "cropId",
"type": "bytes32"
}
],
"name": "LogAyiiRiskDataRequested",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "policies",
"type": "uint256"
}
],
"name": "LogAyiiRiskProcessed",
"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": "componentId",
"type": "uint256"
}
],
"name": "LogProductApproved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "productAddress",
"type": "address"
}
],
"name": "LogProductCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
}
],
"name": "LogProductDeclined",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
}
],
"name": "LogProductProposed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bool",
"name": "callSuccess",
"type": "bool"
},
{
"indexed": false,
"internalType": "uint256",
"name": "returnDataLength",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes",
"name": "returnData",
"type": "bytes"
}
],
"name": "LogTransferHelperCallFailed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bool",
"name": "tokenIsContract",
"type": "bool"
},
{
"indexed": false,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
}
],
"name": "LogTransferHelperInputValidation1Failed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "allowance",
"type": "uint256"
}
],
"name": "LogTransferHelperInputValidation2Failed",
"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"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleGranted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleRevoked",
"type": "event"
},
{
"inputs": [],
"name": "AAAY_MAX",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "AAAY_MIN",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DEFAULT_ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "INSURER_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "NAME",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "PERCENTAGE_MULTIPLIER",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "POLICY_FLOW",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "RISK_APH_MAX",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "RISK_EXIT_MAX",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "RISK_TSI_AT_EXIT_MIN",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "VERSION",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "expectedPremiumAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sumInsuredAmount",
"type": "uint256"
}
],
"name": "adjustPremiumSumInsured",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "trigger",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "exit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tsi",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "aph",
"type": "uint256"
}
],
"name": "adjustRisk",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "applications",
"outputs": [
{
"internalType": "uint256",
"name": "applicationCount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "policyHolder",
"type": "address"
},
{
"internalType": "uint256",
"name": "premium",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sumInsured",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
}
],
"name": "applyForPolicy",
"outputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "approvalCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "archiveCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "payoutPercentage",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sumInsuredAmount",
"type": "uint256"
}
],
"name": "calculatePayout",
"outputs": [
{
"internalType": "uint256",
"name": "payoutAmount",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tsi",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "trigger",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "exit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "aph",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "aaay",
"type": "uint256"
}
],
"name": "calculatePayoutPercentage",
"outputs": [
{
"internalType": "uint256",
"name": "payoutPercentage",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"name": "cancelOracleRequest",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "policyId",
"type": "bytes32"
}
],
"name": "collectPremium",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
},
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "netPremium",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "policyId",
"type": "bytes32"
},
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "collectPremium",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
},
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "netPremium",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "projectId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "uaiId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "cropId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "trigger",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "exit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tsi",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "aph",
"type": "uint256"
}
],
"name": "createRisk",
"outputs": [
{
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "declineCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getApplicationDataStructure",
"outputs": [
{
"internalType": "string",
"name": "dataStructure",
"type": "string"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "applicationIdx",
"type": "uint256"
}
],
"name": "getApplicationId",
"outputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getClaimDataStructure",
"outputs": [
{
"internalType": "string",
"name": "dataStructure",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getName",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getPayoutDataStructure",
"outputs": [
{
"internalType": "string",
"name": "dataStructure",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getPercentageMultiplier",
"outputs": [
{
"internalType": "uint256",
"name": "multiplier",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getPolicyFlow",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "policyIdx",
"type": "uint256"
}
],
"name": "getPolicyId",
"outputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getRegistry",
"outputs": [
{
"internalType": "contract IRegistry",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
}
],
"name": "getRisk",
"outputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "projectId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "uaiId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "cropId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "trigger",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "exit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tsi",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "aph",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "requestId",
"type": "uint256"
},
{
"internalType": "bool",
"name": "requestTriggered",
"type": "bool"
},
{
"internalType": "uint256",
"name": "responseAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "aaay",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "payoutPercentage",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"internalType": "struct AyiiProduct.Risk",
"name": "risk",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "projectId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "uaiId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "cropId",
"type": "bytes32"
}
],
"name": "getRiskId",
"outputs": [
{
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idx",
"type": "uint256"
}
],
"name": "getRiskId",
"outputs": [
{
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getRiskpoolId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
}
],
"name": "getRoleAdmin",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getState",
"outputs": [
{
"internalType": "enum IComponent.ComponentState",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getToken",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getType",
"outputs": [
{
"internalType": "enum IComponent.ComponentType",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "grantRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "hasRole",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isOracle",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isProduct",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isRiskpool",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "requestId",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "responseData",
"type": "bytes"
}
],
"name": "oracleCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "pauseCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
}
],
"name": "policies",
"outputs": [
{
"internalType": "uint256",
"name": "policyCount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "riskId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "batchSize",
"type": "uint256"
}
],
"name": "processPoliciesForRisk",
"outputs": [
{
"internalType": "bytes32[]",
"name": "processedPolicies",
"type": "bytes32[]"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "policyId",
"type": "bytes32"
}
],
"name": "processPolicy",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "proposalCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "renounceRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "resumeCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "revokeRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "capacity",
"type": "uint256"
}
],
"name": "riskPoolCapacityCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "risks",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "setId",
"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": "suspendCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"name": "triggerOracle",
"outputs": [
{
"internalType": "uint256",
"name": "requestId",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"name": "underwrite",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "unpauseCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"allSourcePaths": {
"0": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/AccessControl.sol",
"10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/utils/Initializable.sol",
"13": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
"18": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"2": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/IAccessControl.sol",
"21": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol",
"22": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"24": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"25": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/ERC165.sol",
"26": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
"27": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/structs/EnumerableSet.sol",
"29": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol",
"30": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"32": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"35": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Product.sol",
"37": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"39": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol",
"4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
"44": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol",
"46": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IComponentOwnerService.sol",
"47": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceOperatorService.sol",
"48": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol",
"49": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IOracleService.sol",
"50": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol",
"51": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol",
"53": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol",
"67": "contracts/examples/AyiiProduct.sol",
"90": "contracts/shared/TransferHelper.sol"
},
"ast": {
"absolutePath": "contracts/examples/AyiiProduct.sol",
"exportedSymbols": {
"AccessControl": [
18281
],
"AccessControlEnumerable": [
21875
],
"AccessController": [
4246
],
"Address": [
26374
],
"AyiiProduct": [
2145
],
"Component": [
25407
],
"ComponentController": [
6504
],
"Context": [
24074
],
"CoreController": [
14924
],
"ERC165": [
26079
],
"EnumerableSet": [
19390
],
"IAccess": [
21938
],
"IAccessControl": [
26055
],
"IAccessControlEnumerable": [
27191
],
"IBundle": [
20491
],
"IBundleToken": [
24052
],
"IComponent": [
22099
],
"IComponentEvents": [
22419
],
"IComponentOwnerService": [
23478
],
"IERC165": [
27203
],
"IERC20": [
18510
],
"IERC20Permit": [
26410
],
"IERC721": [
23745
],
"IInstanceOperatorService": [
23629
],
"IInstanceService": [
22849
],
"IOracle": [
22133
],
"IOracleService": [
23755
],
"IPolicy": [
20837
],
"IPool": [
21652
],
"IProduct": [
21995
],
"IProductService": [
23900
],
"IRegistry": [
21750
],
"IRiskpool": [
22366
],
"IRiskpoolService": [
24006
],
"ITreasury": [
23443
],
"Initializable": [
18432
],
"Ownable": [
20950
],
"PolicyController": [
8529
],
"Product": [
20018
],
"SafeERC20": [
18791
],
"Strings": [
23075
],
"TransferHelper": [
15170
]
},
"id": 2146,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 387,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "32:22:67"
},
{
"absolutePath": "contracts/shared/TransferHelper.sol",
"file": "../shared/TransferHelper.sol",
"id": 388,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 2146,
"sourceUnit": 15171,
"src": "56:38:67",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/AccessControl.sol",
"file": "@openzeppelin/contracts/access/AccessControl.sol",
"id": 389,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 2146,
"sourceUnit": 18282,
"src": "96:58:67",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/utils/Initializable.sol",
"file": "@openzeppelin/contracts/proxy/utils/Initializable.sol",
"id": 390,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 2146,
"sourceUnit": 18433,
"src": "155:63:67",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"id": 391,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 2146,
"sourceUnit": 18511,
"src": "219:56:67",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/utils/SafeERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol",
"id": 392,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 2146,
"sourceUnit": 18792,
"src": "276:65:67",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openze