{
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "activeBundles",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        }
      ],
      "name": "LogBasicRiskpoolBundlesAndPolicies",
      "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": "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": "id",
          "type": "uint256"
        }
      ],
      "name": "LogRiskpoolApproved",
      "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": "bool",
          "name": "isMatching",
          "type": "bool"
        }
      ],
      "name": "LogRiskpoolBundleMatchesPolicy",
      "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": "DEFAULT_FILTER_DATA_STRUCTURE",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "FULL_COLLATERALIZATION_LEVEL",
      "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": [],
      "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": "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": "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": "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": "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": "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": "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": "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": "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": [],
      "name": "getOwner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getRegistry",
      "outputs": [
        {
          "internalType": "contract IRegistry",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getState",
      "outputs": [
        {
          "internalType": "enum IComponent.ComponentState",
          "name": "",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getSumOfSumInsuredCap",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getTotalValueLocked",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getType",
      "outputs": [
        {
          "internalType": "enum IComponent.ComponentType",
          "name": "",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getWallet",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "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": "bundleId",
          "type": "uint256"
        }
      ],
      "name": "lockBundle",
      "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": "processId",
          "type": "bytes32"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "processPolicyPayout",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "processId",
          "type": "bytes32"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "processPolicyPremium",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "proposalCallback",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "processId",
          "type": "bytes32"
        }
      ],
      "name": "releasePolicy",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "resumeCallback",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        }
      ],
      "name": "setId",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "maximumNumberOfActiveBundles",
          "type": "uint256"
        }
      ],
      "name": "setMaximumNumberOfActiveBundles",
      "outputs": [],
      "stateMutability": "nonpayable",
      "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": "uint256",
          "name": "bundleId",
          "type": "uint256"
        }
      ],
      "name": "unlockBundle",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "unpauseCallback",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "allSourcePaths": {
    "0": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/access/Ownable.sol",
    "12": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol",
    "15": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Riskpool.sol",
    "16": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
    "18": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol",
    "2": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/IERC20.sol",
    "21": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol",
    "23": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IComponentOwnerService.sol",
    "24": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceOperatorService.sol",
    "25": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol",
    "26": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IOracleService.sol",
    "27": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol",
    "28": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol",
    "29": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol",
    "4": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/IERC721.sol",
    "5": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Context.sol",
    "6": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/introspection/IERC165.sol",
    "7": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/BasicRiskpool.sol",
    "8": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol",
    "9": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol"
  },
  "ast": {
    "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/BasicRiskpool.sol",
    "exportedSymbols": {
      "BasicRiskpool": [
        3428
      ],
      "Component": [
        5114
      ],
      "Context": [
        6682
      ],
      "IAccess": [
        6858
      ],
      "IBundle": [
        3612
      ],
      "IBundleToken": [
        4029
      ],
      "IComponent": [
        5218
      ],
      "IComponentEvents": [
        6911
      ],
      "IComponentOwnerService": [
        7044
      ],
      "IERC165": [
        7662
      ],
      "IERC20": [
        4694
      ],
      "IERC721": [
        6660
      ],
      "IInstanceOperatorService": [
        7311
      ],
      "IInstanceService": [
        5668
      ],
      "IOracleService": [
        5262
      ],
      "IPolicy": [
        3958
      ],
      "IPool": [
        7160
      ],
      "IProductService": [
        5813
      ],
      "IRegistry": [
        7009
      ],
      "IRiskpool": [
        7650
      ],
      "IRiskpoolService": [
        7417
      ],
      "ITreasury": [
        2409
      ],
      "Ownable": [
        6795
      ],
      "Riskpool": [
        6544
      ]
    },
    "id": 3429,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 3141,
        "literals": [
          "solidity",
          "0.8",
          ".2"
        ],
        "nodeType": "PragmaDirective",
        "src": "40:22:7"
      },
      {
        "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Riskpool.sol",
        "file": "./Riskpool.sol",
        "id": 3142,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 3429,
        "sourceUnit": 6545,
        "src": "66:24:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IBundle.sol",
        "file": "../modules/IBundle.sol",
        "id": 3143,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 3429,
        "sourceUnit": 3613,
        "src": "92:32:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol",
        "file": "../modules/IPolicy.sol",
        "id": 3144,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 3429,
        "sourceUnit": 3959,
        "src": "126:32:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": true,
        "baseContracts": [
          {
            "baseName": {
              "id": 3145,
              "name": "Riskpool",
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 6544,
              "src": "279:8:7"
            },
            "id": 3146,
            "nodeType": "InheritanceSpecifier",
            "src": "279:8:7"
          }
        ],
        "contractDependencies": [
          5114,
          5218,
          6544,
          6682,
          6795,
          6911,
          7650
        ],
        "contractKind": "contract",
        "fullyImplemented": false,
        "id": 3428,
        "linearizedBaseContracts": [
          3428,
          6544,
          5114,
          6795,
          6682,
          6911,
          7650,
          5218
        ],
        "name": "BasicRiskpool",
        "nameLocation": "262:13:7",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "anonymous": false,
            "id": 3152,
            "name": "LogBasicRiskpoolBundlesAndPolicies",
            "nameLocation": "303:34:7",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 3151,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3148,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "activeBundles",
                  "nameLocation": "346:13:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3152,
                  "src": "338:21:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3147,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "338:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3150,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "bundleId",
                  "nameLocation": "369:8:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3152,
                  "src": "361:16:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3149,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "361:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "337:41:7"
            },
            "src": "297:82:7"
          },
          {
            "anonymous": false,
            "id": 3162,
            "name": "LogBasicRiskpoolCandidateBundleAmountCheck",
            "nameLocation": "391:42:7",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 3161,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3154,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "index",
                  "nameLocation": "442:5:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3162,
                  "src": "434:13:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3153,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "434:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3156,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "bundleId",
                  "nameLocation": "457:8:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3162,
                  "src": "449:16:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3155,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "449:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3158,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "maxAmount",
                  "nameLocation": "475:9:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3162,
                  "src": "467:17:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3157,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "467:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3160,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "collateralAmount",
                  "nameLocation": "494:16:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3162,
                  "src": "486:24:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3159,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "486:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "433:78:7"
            },
            "src": "385:127:7"
          },
          {
            "constant": false,
            "id": 3166,
            "mutability": "mutable",
            "name": "_collateralizedBy",
            "nameLocation": "745:17:7",
            "nodeType": "VariableDeclaration",
            "scope": 3428,
            "src": "676:86:7",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
              "typeString": "mapping(bytes32 => uint256)"
            },
            "typeName": {
              "id": 3165,
              "keyType": {
                "id": 3163,
                "name": "bytes32",
                "nodeType": "ElementaryTypeName",
                "src": "684:7:7",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes32",
                  "typeString": "bytes32"
                }
              },
              "nodeType": "Mapping",
              "src": "676:59:7",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                "typeString": "mapping(bytes32 => uint256)"
              },
              "valueType": {
                "id": 3164,
                "name": "uint256",
                "nodeType": "ElementaryTypeName",
                "src": "711:7:7",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                }
              }
            },
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 3169,
            "mutability": "mutable",
            "name": "_policiesCounter",
            "nameLocation": "784:16:7",
            "nodeType": "VariableDeclaration",
            "scope": 3428,
            "src": "769:35:7",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint32",
              "typeString": "uint32"
            },
            "typeName": {
              "id": 3167,
              "name": "uint32",
              "nodeType": "ElementaryTypeName",
              "src": "769:6:7",
              "typeDescriptions": {
                "typeIdentifier": "t_uint32",
                "typeString": "uint32"
              }
            },
            "value": {
              "hexValue": "30",
              "id": 3168,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "803:1:7",
              "typeDescriptions": {
                "typeIdentifier": "t_rational_0_by_1",
                "typeString": "int_const 0"
              },
              "value": "0"
            },
            "visibility": "private"
          },
          {
            "body": {
              "id": 3192,
              "nodeType": "Block",
              "src": "1107:3:7",
              "statements": []
            },
            "id": 3193,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 3184,
                    "name": "name",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 3171,
                    "src": "1027:4:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  {
                    "id": 3185,
                    "name": "collateralization",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 3173,
                    "src": "1033:17:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "id": 3186,
                    "name": "sumOfSumInsuredCap",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 3175,
                    "src": "1052:18:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "id": 3187,
                    "name": "erc20Token",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 3177,
                    "src": "1072:10:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  {
                    "id": 3188,
                    "name": "wallet",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 3179,
                    "src": "1084:6:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  {
                    "id": 3189,
                    "name": "registry",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 3181,
                    "src": "1092:8:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 3190,
                "modifierName": {
                  "id": 3183,
                  "name": "Riskpool",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 6544,
                  "src": "1018:8:7"
                },
                "nodeType": "ModifierInvocation",
                "src": "1018:83:7"
              }
            ],
            "name": "",
            "nameLocation": "-1:-1:-1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 3182,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3171,
                  "mutability": "mutable",
                  "name": "name",
                  "nameLocation": "843:4:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3193,
                  "src": "835:12:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 3170,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "835:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3173,
                  "mutability": "mutable",
                  "name": "collateralization",
                  "nameLocation": "866:17:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3193,
                  "src": "858:25:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3172,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "858:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3175,
                  "mutability": "mutable",
                  "name": "sumOfSumInsuredCap",
                  "nameLocation": "902:18:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3193,
                  "src": "894:26:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3174,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "894:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3177,
                  "mutability": "mutable",
                  "name": "erc20Token",
                  "nameLocation": "939:10:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3193,
                  "src": "931:18:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 3176,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "931:7:7",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3179,
                  "mutability": "mutable",
                  "name": "wallet",
                  "nameLocation": "968:6:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3193,
                  "src": "960:14:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 3178,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "960:7:7",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3181,
                  "mutability": "mutable",
                  "name": "registry",
                  "nameLocation": "993:8:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3193,
                  "src": "985:16:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 3180,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "985:7:7",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "824:184:7"
            },
            "returnParameters": {
              "id": 3191,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1107:0:7"
            },
            "scope": 3428,
            "src": "813:297:7",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              6522
            ],
            "body": {
              "id": 3357,
              "nodeType": "Block",
              "src": "1668:2266:7",
              "statements": [
                {
                  "assignments": [
                    3204
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 3204,
                      "mutability": "mutable",
                      "name": "activeBundles",
                      "nameLocation": "1687:13:7",
                      "nodeType": "VariableDeclaration",
                      "scope": 3357,
                      "src": "1679:21:7",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 3203,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1679:7:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 3207,
                  "initialValue": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 3205,
                      "name": "activeBundles",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6374,
                      "src": "1703:13:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                        "typeString": "function () view returns (uint256)"
                      }
                    },
                    "id": 3206,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1703:15:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1679:39:7"
                },
                {
                  "assignments": [
                    3209
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 3209,
                      "mutability": "mutable",
                      "name": "capital",
                      "nameLocation": "1737:7:7",
                      "nodeType": "VariableDeclaration",
                      "scope": 3357,
                      "src": "1729:15:7",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 3208,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1729:7:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 3212,
                  "initialValue": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 3210,
                      "name": "getCapital",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6430,
                      "src": "1747:10:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                        "typeString": "function () view returns (uint256)"
                      }
                    },
                    "id": 3211,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1747:12:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1729:30:7"
                },
                {
                  "assignments": [
                    3214
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 3214,
                      "mutability": "mutable",
                      "name": "lockedCapital",
                      "nameLocation": "1778:13:7",
                      "nodeType": "VariableDeclaration",
                      "scope": 3357,
                      "src": "1770:21:7",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 3213,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1770:7:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 3217,
                  "initialValue": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 3215,
                      "name": "getTotalValueLocked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6447,
                      "src": "1794:19:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                        "typeString": "function () view returns (uint256)"
                      }
                    },
                    "id": 3216,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1794:21:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1770:45:7"
                },
                {
                  "eventCall": {
                    "arguments": [
                      {
                        "id": 3219,
                        "name": "activeBundles",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3204,
                        "src": "1868:13:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 3220,
                        "name": "_policiesCounter",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3169,
                        "src": "1883:16:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      ],
                      "id": 3218,
                      "name": "LogBasicRiskpoolBundlesAndPolicies",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3152,
                      "src": "1833:34:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (uint256,uint256)"
                      }
                    },
                    "id": 3221,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1833:67:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 3222,
                  "nodeType": "EmitStatement",
                  "src": "1828:72:7"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 3226,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 3224,
                          "name": "activeBundles",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3204,
                          "src": "1919:13:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">",
                        "rightExpression": {
                          "hexValue": "30",
                          "id": 3225,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1935:1:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "1919:17:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "4552524f523a4252502d3030313a4e4f5f4143544956455f42554e444c4553",
                        "id": 3227,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1938:33:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_5f018d5c9d0ffbe4a6bed940729e864f2f328246ad7beca8b4bb8a10cde0ff08",
                          "typeString": "literal_string \"ERROR:BRP-001:NO_ACTIVE_BUNDLES\""
                        },
                        "value": "ERROR:BRP-001:NO_ACTIVE_BUNDLES"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_5f018d5c9d0ffbe4a6bed940729e864f2f328246ad7beca8b4bb8a10cde0ff08",
                          "typeString": "literal_string \"ERROR:BRP-001:NO_ACTIVE_BUNDLES\""
                        }
                      ],
                      "id": 3223,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "1911:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 3228,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1911:61:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 3229,
                  "nodeType": "ExpressionStatement",
                  "src": "1911:61:7"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 3233,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 3231,
                          "name": "capital",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3209,
                          "src": "1991:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">",
                        "rightExpression": {
                          "id": 3232,
                          "name": "lockedCapital",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3214,
                          "src": "2001:13:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "1991:23:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "4552524f523a4252502d3030323a4e4f5f465245455f4341504954414c",
                        "id": 3234,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2016:31:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_8666a6be95c8b59292bddcec1001319daf412450a7c966dd3f24e54df39de22a",
                          "typeString": "literal_string \"ERROR:BRP-002:NO_FREE_CAPITAL\""
                        },
                        "value": "ERROR:BRP-002:NO_FREE_CAPITAL"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_8666a6be95c8b59292bddcec1001319daf412450a7c966dd3f24e54df39de22a",
                          "typeString": "literal_string \"ERROR:BRP-002:NO_FREE_CAPITAL\""
                        }
                      ],
                      "id": 3230,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "1983:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 3235,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1983:65:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 3236,
                  "nodeType": "ExpressionStatement",
                  "src": "1983:65:7"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 3241,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 3237,
                      "name": "capital",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3209,
                      "src": "2124:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 3240,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 3238,
                        "name": "lockedCapital",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3214,
                        "src": "2135:13:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "id": 3239,
                        "name": "collateralAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3197,
                        "src": "2151:16:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "2135:32:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2124:43:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 3356,
                  "nodeType": "IfStatement",
                  "src": "2121:1806:7",
                  "trueBody": {
                    "id": 3355,
                    "nodeType": "Block",
                    "src": "2169:1758:7",
                    "statements": [
                      {
                        "assignments": [
                          3246
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 3246,
                            "mutability": "mutable",
                            "name": "application",
                            "nameLocation": "2211:11:7",
                            "nodeType": "VariableDeclaration",
                            "scope": 3355,
                            "src": "2184:38:7",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Application_$3787_memory_ptr",
                              "typeString": "struct IPolicy.Application"
                            },
                            "typeName": {
                              "id": 3245,
                              "nodeType": "UserDefinedTypeName",
                              "pathNode": {
                                "id": 3244,
                                "name": "IPolicy.Application",
                                "nodeType": "IdentifierPath",
                                "referencedDeclaration": 3787,
                                "src": "2184:19:7"
                              },
                              "referencedDeclaration": 3787,
                              "src": "2184:19:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Application_$3787_storage_ptr",
                                "typeString": "struct IPolicy.Application"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 3251,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 3249,
                              "name": "processId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3195,
                              "src": "2257:9:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "expression": {
                              "id": 3247,
                              "name": "_instanceService",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5837,
                              "src": "2225:16:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IInstanceService_$5668",
                                "typeString": "contract IInstanceService"
                              }
                            },
                            "id": 3248,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getApplication",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 5595,
                            "src": "2225:31:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_struct$_Application_$3787_memory_ptr_$",
                              "typeString": "function (bytes32) view external returns (struct IPolicy.Application memory)"
                            }
                          },
                          "id": 3250,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2225:42:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_Application_$3787_memory_ptr",
                            "typeString": "struct IPolicy.Application memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2184:83:7"
                      },
                      {
                        "assignments": [
                          3253
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 3253,
                            "mutability": "mutable",
                            "name": "idx",
                            "nameLocation": "2368:3:7",
                            "nodeType": "VariableDeclaration",
                            "scope": 3355,
                            "src": "2363:8:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 3252,
                              "name": "uint",
                              "nodeType": "ElementaryTypeName",
                              "src": "2363:4:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 3257,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 3256,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 3254,
                            "name": "_policiesCounter",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3169,
                            "src": "2374:16:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint32",
                              "typeString": "uint32"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "%",
                          "rightExpression": {
                            "id": 3255,
                            "name": "activeBundles",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3204,
                            "src": "2393:13:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2374:32:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2363:43:7"
                      },
                      {
                        "body": {
                          "id": 3353,
                          "nodeType": "Block",
                          "src": "2921:995:7",
                          "statements": [
                            {
                              "assignments": [
                                3272
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 3272,
                                  "mutability": "mutable",
                                  "name": "bundleId",
                                  "nameLocation": "2948:8:7",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 3353,
                                  "src": "2940:16:7",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 3271,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2940:7:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 3276,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 3274,
                                    "name": "idx",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3253,
                                    "src": "2977:3:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 3273,
                                  "name": "getActiveBundleId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6404,
                                  "src": "2959:17:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256) view returns (uint256)"
                                  }
                                },
                                "id": 3275,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2959:22:7",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2940:41:7"
                            },
                            {
                              "assignments": [
                                3281
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 3281,
                                  "mutability": "mutable",
                                  "name": "bundle",
                                  "nameLocation": "3022:6:7",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 3353,
                                  "src": "3000:28:7",
                                  "stateVariable": false,
                                  "storageLocation": "memory",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_Bundle_$3528_memory_ptr",
                                    "typeString": "struct IBundle.Bundle"
                                  },
                                  "typeName": {
                                    "id": 3280,
                                    "nodeType": "UserDefinedTypeName",
                                    "pathNode": {
                                      "id": 3279,
                                      "name": "IBundle.Bundle",
                                      "nodeType": "IdentifierPath",
                                      "referencedDeclaration": 3528,
                                      "src": "3000:14:7"
                                    },
                                    "referencedDeclaration": 3528,
                                    "src": "3000:14:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_Bundle_$3528_storage_ptr",
                                      "typeString": "struct IBundle.Bundle"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 3286,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 3284,
                                    "name": "bundleId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3272,
                                    "src": "3058:8:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 3282,
                                    "name": "_instanceService",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5837,
                                    "src": "3031:16:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IInstanceService_$5668",
                                      "typeString": "contract IInstanceService"
                                    }
                                  },
                                  "id": 3283,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "getBundle",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 5567,
                                  "src": "3031:26:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_struct$_Bundle_$3528_memory_ptr_$",
                                    "typeString": "function (uint256) view external returns (struct IBundle.Bundle memory)"
                                  }
                                },
                                "id": 3285,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3031:36:7",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_Bundle_$3528_memory_ptr",
                                  "typeString": "struct IBundle.Bundle memory"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3000:67:7"
                            },
                            {
                              "assignments": [
                                3288
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 3288,
                                  "mutability": "mutable",
                                  "name": "isMatching",
                                  "nameLocation": "3091:10:7",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 3353,
                                  "src": "3086:15:7",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "typeName": {
                                    "id": 3287,
                                    "name": "bool",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3086:4:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 3293,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 3290,
                                    "name": "bundle",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3281,
                                    "src": "3129:6:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_Bundle_$3528_memory_ptr",
                                      "typeString": "struct IBundle.Bundle memory"
                                    }
                                  },
                                  {
                                    "id": 3291,
                                    "name": "application",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3246,
                                    "src": "3137:11:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_Application_$3787_memory_ptr",
                                      "typeString": "struct IPolicy.Application memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_struct$_Bundle_$3528_memory_ptr",
                                      "typeString": "struct IBundle.Bundle memory"
                                    },
                                    {
                                      "typeIdentifier": "t_struct$_Application_$3787_memory_ptr",
                                      "typeString": "struct IPolicy.Application memory"
                                    }
                                  ],
                                  "id": 3289,
                                  "name": "bundleMatchesApplication",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6493,
                                  "src": "3104:24:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_struct$_Bundle_$3528_memory_ptr_$_t_struct$_Application_$3787_memory_ptr_$returns$_t_bool_$",
                                    "typeString": "function (struct IBundle.Bundle memory,struct IPolicy.Application memory) view returns (bool)"
                                  }
                                },
                                "id": 3292,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3104:45:7",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3086:63:7"
                            },
                            {
                              "eventCall": {
                                "arguments": [
                                  {
                                    "id": 3295,
                                    "name": "bundleId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3272,
                                    "src": "3204:8:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 3296,
                                    "name": "isMatching",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3288,
                                    "src": "3214:10:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  ],
                                  "id": 3294,
                                  "name": "LogRiskpoolBundleMatchesPolicy",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7452,
                                  "src": "3173:30:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bool_$returns$__$",
                                    "typeString": "function (uint256,bool)"
                                  }
                                },
                                "id": 3297,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3173:52:7",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 3298,
                              "nodeType": "EmitStatement",
                              "src": "3168:57:7"
                            },
                            {
                              "condition": {
                                "id": 3299,
                                "name": "isMatching",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3288,
                                "src": "3250:10:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 3352,
                              "nodeType": "IfStatement",
                              "src": "3246:655:7",
                              "trueBody": {
                                "id": 3351,
                                "nodeType": "Block",
                                "src": "3262:639:7",
                                "statements": [
                                  {
                                    "assignments": [
                                      3301
                                    ],
                                    "declarations": [
                                      {
                                        "constant": false,
                                        "id": 3301,
                                        "mutability": "mutable",
                                        "name": "maxAmount",
                                        "nameLocation": "3293:9:7",
                                        "nodeType": "VariableDeclaration",
                                        "scope": 3351,
                                        "src": "3285:17:7",
                                        "stateVariable": false,
                                        "storageLocation": "default",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "typeName": {
                                          "id": 3300,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "3285:7:7",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "visibility": "internal"
                                      }
                                    ],
                                    "id": 3307,
                                    "initialValue": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 3306,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "expression": {
                                          "id": 3302,
                                          "name": "bundle",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 3281,
                                          "src": "3305:6:7",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_Bundle_$3528_memory_ptr",
                                            "typeString": "struct IBundle.Bundle memory"
                                          }
                                        },
                                        "id": 3303,
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "capital",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 3519,
                                        "src": "3305:14:7",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "-",
                                      "rightExpression": {
                                        "expression": {
                                          "id": 3304,
                                          "name": "bundle",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 3281,
                                          "src": "3322:6:7",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_Bundle_$3528_memory_ptr",
                                            "typeString": "struct IBundle.Bundle memory"
                                          }
                                        },
                                        "id": 3305,
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "lockedCapital",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 3521,
                                        "src": "3322:20:7",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "3305:37:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "3285:57:7"
                                  },
                                  {
                                    "eventCall": {
                                      "arguments": [
                                        {
                                          "id": 3309,
                                          "name": "idx",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 3253,
                                          "src": "3413:3:7",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        {
                                          "id": 3310,
                                          "name": "bundleId",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 3272,
                                          "src": "3418:8:7",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        {
                                          "id": 3311,
                                          "name": "maxAmount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 3301,
                                          "src": "3428:9:7",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        {
                                          "id": 3312,
                                          "name": "collateralAmount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 3197,
                                          "src": "3439:16:7",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "id": 3308,
                                        "name": "LogBasicRiskpoolCandidateBundleAmountCheck",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3162,
                                        "src": "3370:42:7",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                                          "typeString": "function (uint256,uint256,uint256,uint256)"
                                        }
                                      },
                                      "id": 3313,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "3370:86:7",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 3314,
                                    "nodeType": "EmitStatement",
                                    "src": "3365:91:7"
                                  },
                                  {
                                    "condition": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 3317,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 3315,
                                        "name": "maxAmount",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3301,
                                        "src": "3485:9:7",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": ">=",
                                      "rightExpression": {
                                        "id": 3316,
                                        "name": "collateralAmount",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3197,
                                        "src": "3498:16:7",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "3485:29:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "falseBody": {
                                      "id": 3349,
                                      "nodeType": "Block",
                                      "src": "3800:82:7",
                                      "statements": [
                                        {
                                          "expression": {
                                            "id": 3347,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftHandSide": {
                                              "id": 3340,
                                              "name": "idx",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 3253,
                                              "src": "3827:3:7",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "nodeType": "Assignment",
                                            "operator": "=",
                                            "rightHandSide": {
                                              "commonType": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              "id": 3346,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "leftExpression": {
                                                "components": [
                                                  {
                                                    "commonType": {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    },
                                                    "id": 3343,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "leftExpression": {
                                                      "id": 3341,
                                                      "name": "idx",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 3253,
                                                      "src": "3834:3:7",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                      }
                                                    },
                                                    "nodeType": "BinaryOperation",
                                                    "operator": "+",
                                                    "rightExpression": {
                                                      "hexValue": "31",
                                                      "id": 3342,
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": true,
                                                      "kind": "number",
                                                      "lValueRequested": false,
                                                      "nodeType": "Literal",
                                                      "src": "3840:1:7",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_rational_1_by_1",
                                                        "typeString": "int_const 1"
                                                      },
                                                      "value": "1"
                                                    },
                                                    "src": "3834:7:7",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  }
                                                ],
                                                "id": 3344,
                                                "isConstant": false,
                                                "isInlineArray": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "nodeType": "TupleExpression",
                                                "src": "3833:9:7",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              "nodeType": "BinaryOperation",
                                              "operator": "%",
                                              "rightExpression": {
                                                "id": 3345,
                                                "name": "activeBundles",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 3204,
                                                "src": "3845:13:7",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              "src": "3833:25:7",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "src": "3827:31:7",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 3348,
                                          "nodeType": "ExpressionStatement",
                                          "src": "3827:31:7"
                                        }
                                      ]
                                    },
                                    "id": 3350,
                                    "nodeType": "IfStatement",
                                    "src": "3481:401:7",
                                    "trueBody": {
                                      "id": 3339,
                                      "nodeType": "Block",
                                      "src": "3516:278:7",
                                      "statements": [
                                        {
                                          "expression": {
                                            "arguments": [
                                              {
                                                "id": 3321,
                                                "name": "bundleId",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 3272,
                                                "src": "3580:8:7",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              {
                                                "id": 3322,
                                                "name": "processId",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 3195,
                                                "src": "3590:9:7",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_bytes32",
                                                  "typeString": "bytes32"
                                                }
                                              },
                                              {
                                                "id": 3323,
                                                "name": "collateralAmount",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 3197,
                                                "src": "3601:16:7",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                },
                                                {
                                                  "typeIdentifier": "t_bytes32",
                                                  "typeString": "bytes32"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "expression": {
                                                "id": 3318,
                                                "name": "_riskpoolService",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 5840,
                                                "src": "3543:16:7",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_contract$_IRiskpoolService_$7417",
                                                  "typeString": "contract IRiskpoolService"
                                                }
                                              },
                                              "id": 3320,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "collateralizePolicy",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": 7382,
                                              "src": "3543:36:7",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bytes32_$_t_uint256_$returns$__$",
                                                "typeString": "function (uint256,bytes32,uint256) external"
                                              }
                                            },
                                            "id": 3324,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "3543:75:7",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_tuple$__$",
                                              "typeString": "tuple()"
                                            }
                                          },
                                          "id": 3325,
                                          "nodeType": "ExpressionStatement",
                                          "src": "3543:75:7"
                                        },
                                        {
                                          "expression": {
                                            "id": 3330,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftHandSide": {
                                              "baseExpression": {
                                                "id": 3326,
                                                "name": "_collateralizedBy",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 3166,
                                                "src": "3645:17:7",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                                                  "typeString": "mapping(bytes32 => uint256)"
                                                }
                                              },
                                              "id": 3328,
                                              "indexExpression": {
                                                "id": 3327,
                                                "name": "processId",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 3195,
                                                "src": "3663:9:7",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_bytes32",
                                                  "typeString": "bytes32"
                                                }
                                              },
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": true,
                                              "nodeType": "IndexAccess",
                                              "src": "3645:28:7",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "nodeType": "Assignment",
                                            "operator": "=",
                                            "rightHandSide": {
                                              "id": 3329,
                                              "name": "bundleId",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 3272,
                                              "src": "3676:8:7",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "src": "3645:39:7",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 3331,
                                          "nodeType": "ExpressionStatement",
                                          "src": "3645:39:7"
                                        },
                                        {
                                          "expression": {
                                            "id": 3334,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftHandSide": {
                                              "id": 3332,
                                              "name": "success",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 3201,
                                              "src": "3711:7:7",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_bool",
                                                "typeString": "bool"
                                              }
                                            },
                                            "nodeType": "Assignment",
                                            "operator": "=",
                                            "rightHandSide": {
                                              "hexValue": "74727565",
                                              "id": 3333,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "kind": "bool",
                                              "lValueRequested": false,
                                              "nodeType": "Literal",
                                              "src": "3721:4:7",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_bool",
                                                "typeString": "bool"
                                              },
                                              "value": "true"
                                            },
                                            "src": "3711:14:7",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_bool",
                                              "typeString": "bool"
                                            }
                                          },
                                          "id": 3335,
                                          "nodeType": "ExpressionStatement",
                                          "src": "3711:14:7"
                                        },
                                        {
                                          "expression": {
                                            "id": 3337,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "nodeType": "UnaryOperation",
                                            "operator": "++",
                                            "prefix": false,
                                            "src": "3752:18:7",
                                            "subExpression": {
                                              "id": 3336,
                                              "name": "_policiesCounter",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 3169,
                                              "src": "3752:16:7",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint32",
                                                "typeString": "uint32"
                                              }
                                            },
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint32",
                                              "typeString": "uint32"
                                            }
                                          },
                                          "id": 3338,
                                          "nodeType": "ExpressionStatement",
                                          "src": "3752:18:7"
                                        }
                                      ]
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 3267,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 3264,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 3262,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3259,
                              "src": "2885:1:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "<",
                            "rightExpression": {
                              "id": 3263,
                              "name": "activeBundles",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3204,
                              "src": "2889:13:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "2885:17:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "id": 3266,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "!",
                            "prefix": true,
                            "src": "2906:8:7",
                            "subExpression": {
                              "id": 3265,
                              "name": "success",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3201,
                              "src": "2907:7:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "2885:29:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 3354,
                        "initializationExpression": {
                          "assignments": [
                            3259
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 3259,
                              "mutability": "mutable",
                              "name": "i",
                              "nameLocation": "2878:1:7",
                              "nodeType": "VariableDeclaration",
                              "scope": 3354,
                              "src": "2870:9:7",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 3258,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2870:7:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 3261,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 3260,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2882:1:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2870:13:7"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 3269,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "2916:3:7",
                            "subExpression": {
                              "id": 3268,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3259,
                              "src": "2916:1:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 3270,
                          "nodeType": "ExpressionStatement",
                          "src": "2916:3:7"
                        },
                        "nodeType": "ForStatement",
                        "src": "2865:1051:7"
                      }
                    ]
                  }
                }
              ]
            },
            "id": 3358,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_lockCollateral",
            "nameLocation": "1542:15:7",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 3199,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "1622:8:7"
            },
            "parameters": {
              "id": 3198,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3195,
                  "mutability": "mutable",
                  "name": "processId",
                  "nameLocation": "1566:9:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3358,
                  "src": "1558:17:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 3194,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1558:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3197,
                  "mutability": "mutable",
                  "name": "collateralAmount",
                  "nameLocation": "1585:16:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3358,
                  "src": "1577:24:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3196,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1577:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1557:45:7"
            },
            "returnParameters": {
              "id": 3202,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3201,
                  "mutability": "mutable",
                  "name": "success",
                  "nameLocation": "1653:7:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3358,
                  "src": "1648:12:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 3200,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1648:4:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1647:14:7"
            },
            "scope": 3428,
            "src": "1533:2401:7",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              6536
            ],
            "body": {
              "id": 3380,
              "nodeType": "Block",
              "src": "4033:136:7",
              "statements": [
                {
                  "assignments": [
                    3367
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 3367,
                      "mutability": "mutable",
                      "name": "bundleId",
                      "nameLocation": "4052:8:7",
                      "nodeType": "VariableDeclaration",
                      "scope": 3380,
                      "src": "4044:16:7",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 3366,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "4044:7:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 3371,
                  "initialValue": {
                    "baseExpression": {
                      "id": 3368,
                      "name": "_collateralizedBy",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3166,
                      "src": "4063:17:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                        "typeString": "mapping(bytes32 => uint256)"
                      }
                    },
                    "id": 3370,
                    "indexExpression": {
                      "id": 3369,
                      "name": "processId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3360,
                      "src": "4081:9:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "4063:28:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4044:47:7"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 3375,
                        "name": "bundleId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3367,
                        "src": "4133:8:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 3376,
                        "name": "processId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3360,
                        "src": "4143:9:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "id": 3377,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3362,
                        "src": "4154:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "id": 3372,
                        "name": "_riskpoolService",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5840,
                        "src": "4102:16:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IRiskpoolService_$7417",
                          "typeString": "contract IRiskpoolService"
                        }
                      },
                      "id": 3374,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "processPayout",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 7400,
                      "src": "4102:30:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bytes32_$_t_uint256_$returns$__$",
                        "typeString": "function (uint256,bytes32,uint256) external"
                      }
                    },
                    "id": 3378,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4102:59:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 3379,
                  "nodeType": "ExpressionStatement",
                  "src": "4102:59:7"
                }
              ]
            },
            "id": 3381,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_processPayout",
            "nameLocation": "3951:14:7",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 3364,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "4019:8:7"
            },
            "parameters": {
              "id": 3363,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3360,
                  "mutability": "mutable",
                  "name": "processId",
                  "nameLocation": "3974:9:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3381,
                  "src": "3966:17:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 3359,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3966:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3362,
                  "mutability": "mutable",
                  "name": "amount",
                  "nameLocation": "3993:6:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3381,
                  "src": "3985:14:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3361,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3985:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3965:35:7"
            },
            "returnParameters": {
              "id": 3365,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4033:0:7"
            },
            "scope": 3428,
            "src": "3942:227:7",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              6529
            ],
            "body": {
              "id": 3403,
              "nodeType": "Block",
              "src": "4269:137:7",
              "statements": [
                {
                  "assignments": [
                    3390
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 3390,
                      "mutability": "mutable",
                      "name": "bundleId",
                      "nameLocation": "4288:8:7",
                      "nodeType": "VariableDeclaration",
                      "scope": 3403,
                      "src": "4280:16:7",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 3389,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "4280:7:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 3394,
                  "initialValue": {
                    "baseExpression": {
                      "id": 3391,
                      "name": "_collateralizedBy",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3166,
                      "src": "4299:17:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                        "typeString": "mapping(bytes32 => uint256)"
                      }
                    },
                    "id": 3393,
                    "indexExpression": {
                      "id": 3392,
                      "name": "processId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3383,
                      "src": "4317:9:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "4299:28:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4280:47:7"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 3398,
                        "name": "bundleId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3390,
                        "src": "4370:8:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 3399,
                        "name": "processId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3383,
                        "src": "4380:9:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "id": 3400,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3385,
                        "src": "4391:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "id": 3395,
                        "name": "_riskpoolService",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5840,
                        "src": "4338:16:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IRiskpoolService_$7417",
                          "typeString": "contract IRiskpoolService"
                        }
                      },
                      "id": 3397,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "processPremium",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 7391,
                      "src": "4338:31:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bytes32_$_t_uint256_$returns$__$",
                        "typeString": "function (uint256,bytes32,uint256) external"
                      }
                    },
                    "id": 3401,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4338:60:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 3402,
                  "nodeType": "ExpressionStatement",
                  "src": "4338:60:7"
                }
              ]
            },
            "id": 3404,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_processPremium",
            "nameLocation": "4186:15:7",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 3387,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "4255:8:7"
            },
            "parameters": {
              "id": 3386,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3383,
                  "mutability": "mutable",
                  "name": "processId",
                  "nameLocation": "4210:9:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3404,
                  "src": "4202:17:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 3382,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "4202:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3385,
                  "mutability": "mutable",
                  "name": "amount",
                  "nameLocation": "4229:6:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3404,
                  "src": "4221:14:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3384,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4221:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4201:35:7"
            },
            "returnParameters": {
              "id": 3388,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4269:0:7"
            },
            "scope": 3428,
            "src": "4177:229:7",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              6543
            ],
            "body": {
              "id": 3426,
              "nodeType": "Block",
              "src": "4538:155:7",
              "statements": [
                {
                  "assignments": [
                    3413
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 3413,
                      "mutability": "mutable",
                      "name": "bundleId",
                      "nameLocation": "4565:8:7",
                      "nodeType": "VariableDeclaration",
                      "scope": 3426,
                      "src": "4557:16:7",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 3412,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "4557:7:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 3417,
                  "initialValue": {
                    "baseExpression": {
                      "id": 3414,
                      "name": "_collateralizedBy",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3166,
                      "src": "4576:17:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                        "typeString": "mapping(bytes32 => uint256)"
                      }
                    },
                    "id": 3416,
                    "indexExpression": {
                      "id": 3415,
                      "name": "processId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3406,
                      "src": "4594:9:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "4576:28:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4557:47:7"
                },
                {
                  "expression": {
                    "id": 3424,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 3418,
                      "name": "collateralAmount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3410,
                      "src": "4615:16:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "arguments": [
                        {
                          "id": 3421,
                          "name": "bundleId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3413,
                          "src": "4665:8:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 3422,
                          "name": "processId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3406,
                          "src": "4675:9:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        ],
                        "expression": {
                          "id": 3419,
                          "name": "_riskpoolService",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5840,
                          "src": "4634:16:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IRiskpoolService_$7417",
                            "typeString": "contract IRiskpoolService"
                          }
                        },
                        "id": 3420,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "releasePolicy",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 7409,
                        "src": "4634:30:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bytes32_$returns$_t_uint256_$",
                          "typeString": "function (uint256,bytes32) external returns (uint256)"
                        }
                      },
                      "id": 3423,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4634:51:7",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4615:70:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 3425,
                  "nodeType": "ExpressionStatement",
                  "src": "4615:70:7"
                }
              ]
            },
            "id": 3427,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_releaseCollateral",
            "nameLocation": "4423:18:7",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 3408,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "4480:8:7"
            },
            "parameters": {
              "id": 3407,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3406,
                  "mutability": "mutable",
                  "name": "processId",
                  "nameLocation": "4450:9:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3427,
                  "src": "4442:17:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 3405,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "4442:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4441:19:7"
            },
            "returnParameters": {
              "id": 3411,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3410,
                  "mutability": "mutable",
                  "name": "collateralAmount",
                  "nameLocation": "4514:16:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3427,
                  "src": "4506:24:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3409,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4506:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4505:26:7"
            },
            "scope": 3428,
            "src": "4414:279:7",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 3429,
        "src": "244:4452:7"
      }
    ],
    "src": "40:4656:7"
  },
  "bytecode": "",
  "bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
  "compiler": {
    "evm_version": "istanbul",
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "version": "0.8.2+commit.661d1103"
  },
  "contractName": "BasicRiskpool",
  "coverageMap": {
    "branches": {},
    "statements": {}
  },
  "dependencies": [
    "etherisc/gif-interface@3b0002a/Component",
    "OpenZeppelin/openzeppelin-contracts@4.8.2/Context",
    "etherisc/gif-interface@3b0002a/IAccess",
    "etherisc/gif-interface@3b0002a/IBundleToken",
    "etherisc/gif-interface@3b0002a/IComponent",
    "etherisc/gif-interface@3b0002a/IComponentEvents",
    "etherisc/gif-interface@3b0002a/IComponentOwnerService",
    "OpenZeppelin/openzeppelin-contracts@4.8.2/IERC165",
    "OpenZeppelin/openzeppelin-contracts@4.8.2/IERC20",
    "OpenZeppelin/openzeppelin-contracts@4.8.2/IERC721",
    "etherisc/gif-interface@3b0002a/IInstanceOperatorService",
    "etherisc/gif-interface@3b0002a/IInstanceService",
    "etherisc/gif-interface@3b0002a/IOracleService",
    "etherisc/gif-interface@3b0002a/IProductService",
    "etherisc/gif-interface@3b0002a/IRegistry",
    "etherisc/gif-interface@3b0002a/IRiskpool",
    "etherisc/gif-interface@3b0002a/IRiskpoolService",
    "OpenZeppelin/openzeppelin-contracts@4.8.2/Ownable",
    "etherisc/gif-interface@3b0002a/Riskpool"
  ],
  "deployedBytecode": "",
  "deployedSourceMap": "",
  "language": "Solidity",
  "natspec": {
    "kind": "dev",
    "methods": {
      "owner()": {
        "details": "Returns the address of the current owner."
      },
      "renounceOwnership()": {
        "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
      },
      "transferOwnership(address)": {
        "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
      }
    },
    "version": 1
  },
  "offset": [
    244,
    4696
  ],
  "opcodes": "",
  "pcMap": {},
  "sha1": "71f9e3077c2385a98f193313b54a63fbc5be79d5",
  "source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.2;\n\nimport \"./Riskpool.sol\";\nimport \"../modules/IBundle.sol\";\nimport \"../modules/IPolicy.sol\";\n\n// basic riskpool always collateralizes one application using exactly one bundle\nabstract contract BasicRiskpool is Riskpool {\n\n    event LogBasicRiskpoolBundlesAndPolicies(uint256 activeBundles, uint256 bundleId);\n    event LogBasicRiskpoolCandidateBundleAmountCheck(uint256 index, uint256 bundleId, uint256 maxAmount, uint256 collateralAmount);\n\n    // remember bundleId for each processId\n    // approach only works for basic risk pool where a\n    // policy is collateralized by exactly one bundle\n    mapping(bytes32 /* processId */ => uint256 /** bundleId */) internal _collateralizedBy;\n    uint32 private _policiesCounter = 0;\n\n    constructor(\n        bytes32 name,\n        uint256 collateralization,\n        uint256 sumOfSumInsuredCap,\n        address erc20Token,\n        address wallet,\n        address registry\n    )\n        Riskpool(name, collateralization, sumOfSumInsuredCap, erc20Token, wallet, registry)\n    { }\n\n    \n\n    // needs to remember which bundles helped to cover ther risk\n    // simple (retail) approach: single policy covered by single bundle\n    // first bundle with a match and sufficient capacity wins\n    // Component <- Riskpool <- BasicRiskpool <- TestRiskpool\n    // complex (wholesale) approach: single policy covered by many bundles\n    // Component <- Riskpool <- AdvancedRiskpool <- TestRiskpool\n    function _lockCollateral(bytes32 processId, uint256 collateralAmount) \n        internal override\n        returns(bool success) \n    {\n        uint256 activeBundles = activeBundles();\n        uint256 capital = getCapital();\n        uint256 lockedCapital = getTotalValueLocked();\n\n        emit LogBasicRiskpoolBundlesAndPolicies(activeBundles, _policiesCounter);\n        require(activeBundles > 0, \"ERROR:BRP-001:NO_ACTIVE_BUNDLES\");\n        require(capital > lockedCapital, \"ERROR:BRP-002:NO_FREE_CAPITAL\");\n\n        // ensure there is a chance to find the collateral\n        if(capital >= lockedCapital + collateralAmount) {\n            IPolicy.Application memory application = _instanceService.getApplication(processId);\n\n            // initialize bundle idx with round robin based on active bundles\n            uint idx = _policiesCounter % activeBundles;\n            \n            // basic riskpool implementation: policy coverage by single bundle only/\n            // the initial bundle is selected via round robin based on the policies counter.\n            // If a bundle does not match (application not matching or insufficient funds for collateral) the next one is tried. \n            // This is continued until all bundles have been tried once. If no bundle matches the policy is rejected.\n            for (uint256 i = 0; i < activeBundles && !success; i++) {\n                uint256 bundleId = getActiveBundleId(idx);\n                IBundle.Bundle memory bundle = _instanceService.getBundle(bundleId);\n                bool isMatching = bundleMatchesApplication(bundle, application);\n                emit LogRiskpoolBundleMatchesPolicy(bundleId, isMatching);\n\n                if (isMatching) {\n                    uint256 maxAmount = bundle.capital - bundle.lockedCapital;\n                    emit LogBasicRiskpoolCandidateBundleAmountCheck(idx, bundleId, maxAmount, collateralAmount);\n\n                    if (maxAmount >= collateralAmount) {\n                        _riskpoolService.collateralizePolicy(bundleId, processId, collateralAmount);\n                        _collateralizedBy[processId] = bundleId;\n                        success = true;\n                        _policiesCounter++;\n                    } else {\n                        idx = (idx + 1) % activeBundles;\n                    }\n                }\n            }\n        }\n    }\n\n    function _processPayout(bytes32 processId, uint256 amount)\n        internal override\n    {\n        uint256 bundleId = _collateralizedBy[processId];\n        _riskpoolService.processPayout(bundleId, processId, amount);\n    }\n\n    function _processPremium(bytes32 processId, uint256 amount)\n        internal override\n    {\n        uint256 bundleId = _collateralizedBy[processId];\n        _riskpoolService.processPremium(bundleId, processId, amount);\n    }\n\n    function _releaseCollateral(bytes32 processId) \n        internal override\n        returns(uint256 collateralAmount) \n    {        \n        uint256 bundleId = _collateralizedBy[processId];\n        collateralAmount = _riskpoolService.releasePolicy(bundleId, processId);\n    }\n}",
  "sourceMap": "",
  "sourcePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/BasicRiskpool.sol",
  "type": "contract"
}