{
  "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/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
    "1": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
    "10": "contracts/components/IRiskpool.sol",
    "13": "contracts/components/Riskpool.sol",
    "14": "contracts/modules/IAccess.sol",
    "16": "contracts/modules/IComponentEvents.sol",
    "2": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
    "21": "contracts/modules/IRegistry.sol",
    "23": "contracts/services/IComponentOwnerService.sol",
    "24": "contracts/services/IInstanceOperatorService.sol",
    "25": "contracts/services/IInstanceService.sol",
    "26": "contracts/services/IOracleService.sol",
    "27": "contracts/services/IProductService.sol",
    "28": "contracts/services/IRiskpoolService.sol",
    "3": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
    "30": "contracts/tokens/IBundleToken.sol",
    "4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
    "5": "contracts/components/BasicRiskpool.sol",
    "6": "contracts/components/Component.sol",
    "7": "contracts/components/IComponent.sol"
  },
  "ast": {
    "absolutePath": "contracts/components/BasicRiskpool.sol",
    "exportedSymbols": {
      "BasicRiskpool": [
        288
      ],
      "Component": [
        708
      ],
      "Context": [
        4978
      ],
      "IAccess": [
        2660
      ],
      "IBundle": [
        2844
      ],
      "IBundleToken": [
        4649
      ],
      "IComponent": [
        812
      ],
      "IComponentEvents": [
        2897
      ],
      "IComponentOwnerService": [
        3833
      ],
      "IERC165": [
        4990
      ],
      "IERC20": [
        4956
      ],
      "IERC721": [
        4878
      ],
      "IInstanceOperatorService": [
        3984
      ],
      "IInstanceService": [
        4333
      ],
      "IOracleService": [
        4343
      ],
      "IPolicy": [
        3257
      ],
      "IPool": [
        3373
      ],
      "IProductService": [
        4488
      ],
      "IRegistry": [
        3538
      ],
      "IRiskpool": [
        1136
      ],
      "IRiskpoolService": [
        4594
      ],
      "ITreasury": [
        3798
      ],
      "Ownable": [
        4762
      ],
      "Riskpool": [
        2597
      ]
    },
    "id": 289,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1,
        "literals": [
          "solidity",
          "0.8",
          ".2"
        ],
        "nodeType": "PragmaDirective",
        "src": "39:22:5"
      },
      {
        "absolutePath": "contracts/components/Riskpool.sol",
        "file": "./Riskpool.sol",
        "id": 2,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 289,
        "sourceUnit": 2598,
        "src": "63:24:5",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "contracts/modules/IBundle.sol",
        "file": "../modules/IBundle.sol",
        "id": 3,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 289,
        "sourceUnit": 2845,
        "src": "88:32:5",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "contracts/modules/IPolicy.sol",
        "file": "../modules/IPolicy.sol",
        "id": 4,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 289,
        "sourceUnit": 3258,
        "src": "121:32:5",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": true,
        "baseContracts": [
          {
            "baseName": {
              "id": 5,
              "name": "Riskpool",
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 2597,
              "src": "271:8:5"
            },
            "id": 6,
            "nodeType": "InheritanceSpecifier",
            "src": "271:8:5"
          }
        ],
        "contractDependencies": [
          708,
          812,
          1136,
          2597,
          2897,
          4762,
          4978
        ],
        "contractKind": "contract",
        "fullyImplemented": false,
        "id": 288,
        "linearizedBaseContracts": [
          288,
          2597,
          708,
          4762,
          4978,
          2897,
          1136,
          812
        ],
        "name": "BasicRiskpool",
        "nameLocation": "254:13:5",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "anonymous": false,
            "id": 12,
            "name": "LogBasicRiskpoolBundlesAndPolicies",
            "nameLocation": "293:34:5",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 11,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "activeBundles",
                  "nameLocation": "336:13:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 12,
                  "src": "328:21:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 7,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "328:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 10,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "bundleId",
                  "nameLocation": "359:8:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 12,
                  "src": "351:16:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "351:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "327:41:5"
            },
            "src": "287:82:5"
          },
          {
            "anonymous": false,
            "id": 22,
            "name": "LogBasicRiskpoolCandidateBundleAmountCheck",
            "nameLocation": "380:42:5",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 21,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "index",
                  "nameLocation": "431:5:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 22,
                  "src": "423:13:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "423:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "bundleId",
                  "nameLocation": "446:8:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 22,
                  "src": "438:16:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "438:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 18,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "maxAmount",
                  "nameLocation": "464:9:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 22,
                  "src": "456:17:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 17,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "456:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 20,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "collateralAmount",
                  "nameLocation": "483:16:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 22,
                  "src": "475:24:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 19,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "475:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "422:78:5"
            },
            "src": "374:127:5"
          },
          {
            "constant": false,
            "id": 26,
            "mutability": "mutable",
            "name": "_collateralizedBy",
            "nameLocation": "729:17:5",
            "nodeType": "VariableDeclaration",
            "scope": 288,
            "src": "660:86:5",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
              "typeString": "mapping(bytes32 => uint256)"
            },
            "typeName": {
              "id": 25,
              "keyType": {
                "id": 23,
                "name": "bytes32",
                "nodeType": "ElementaryTypeName",
                "src": "668:7:5",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes32",
                  "typeString": "bytes32"
                }
              },
              "nodeType": "Mapping",
              "src": "660:59:5",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                "typeString": "mapping(bytes32 => uint256)"
              },
              "valueType": {
                "id": 24,
                "name": "uint256",
                "nodeType": "ElementaryTypeName",
                "src": "695:7:5",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                }
              }
            },
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 29,
            "mutability": "mutable",
            "name": "_policiesCounter",
            "nameLocation": "767:16:5",
            "nodeType": "VariableDeclaration",
            "scope": 288,
            "src": "752:35:5",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint32",
              "typeString": "uint32"
            },
            "typeName": {
              "id": 27,
              "name": "uint32",
              "nodeType": "ElementaryTypeName",
              "src": "752:6:5",
              "typeDescriptions": {
                "typeIdentifier": "t_uint32",
                "typeString": "uint32"
              }
            },
            "value": {
              "hexValue": "30",
              "id": 28,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "786:1:5",
              "typeDescriptions": {
                "typeIdentifier": "t_rational_0_by_1",
                "typeString": "int_const 0"
              },
              "value": "0"
            },
            "visibility": "private"
          },
          {
            "body": {
              "id": 52,
              "nodeType": "Block",
              "src": "1079:3:5",
              "statements": []
            },
            "id": 53,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 44,
                    "name": "name",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 31,
                    "src": "1000:4:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  {
                    "id": 45,
                    "name": "collateralization",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 33,
                    "src": "1006:17:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "id": 46,
                    "name": "sumOfSumInsuredCap",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 35,
                    "src": "1025:18:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "id": 47,
                    "name": "erc20Token",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 37,
                    "src": "1045:10:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  {
                    "id": 48,
                    "name": "wallet",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 39,
                    "src": "1057:6:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  {
                    "id": 49,
                    "name": "registry",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 41,
                    "src": "1065:8:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 50,
                "modifierName": {
                  "id": 43,
                  "name": "Riskpool",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 2597,
                  "src": "991:8:5"
                },
                "nodeType": "ModifierInvocation",
                "src": "991:83:5"
              }
            ],
            "name": "",
            "nameLocation": "-1:-1:-1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 42,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 31,
                  "mutability": "mutable",
                  "name": "name",
                  "nameLocation": "823:4:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 53,
                  "src": "815:12:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 30,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "815:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 33,
                  "mutability": "mutable",
                  "name": "collateralization",
                  "nameLocation": "845:17:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 53,
                  "src": "837:25:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 32,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "837:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 35,
                  "mutability": "mutable",
                  "name": "sumOfSumInsuredCap",
                  "nameLocation": "880:18:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 53,
                  "src": "872:26:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 34,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "872:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 37,
                  "mutability": "mutable",
                  "name": "erc20Token",
                  "nameLocation": "916:10:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 53,
                  "src": "908:18:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 36,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "908:7:5",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 39,
                  "mutability": "mutable",
                  "name": "wallet",
                  "nameLocation": "944:6:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 53,
                  "src": "936:14:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 38,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "936:7:5",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 41,
                  "mutability": "mutable",
                  "name": "registry",
                  "nameLocation": "968:8:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 53,
                  "src": "960:16:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 40,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "960:7:5",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "805:177:5"
            },
            "returnParameters": {
              "id": 51,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1079:0:5"
            },
            "scope": 288,
            "src": "794:288:5",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              2575
            ],
            "body": {
              "id": 217,
              "nodeType": "Block",
              "src": "1627:2225:5",
              "statements": [
                {
                  "assignments": [
                    64
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 64,
                      "mutability": "mutable",
                      "name": "activeBundles",
                      "nameLocation": "1645:13:5",
                      "nodeType": "VariableDeclaration",
                      "scope": 217,
                      "src": "1637:21:5",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 63,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1637:7:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 67,
                  "initialValue": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 65,
                      "name": "activeBundles",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2427,
                      "src": "1661:13:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                        "typeString": "function () view returns (uint256)"
                      }
                    },
                    "id": 66,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1661:15:5",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1637:39:5"
                },
                {
                  "assignments": [
                    69
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 69,
                      "mutability": "mutable",
                      "name": "capital",
                      "nameLocation": "1694:7:5",
                      "nodeType": "VariableDeclaration",
                      "scope": 217,
                      "src": "1686:15:5",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 68,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1686:7:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 72,
                  "initialValue": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 70,
                      "name": "getCapital",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2483,
                      "src": "1704:10:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                        "typeString": "function () view returns (uint256)"
                      }
                    },
                    "id": 71,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1704:12:5",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1686:30:5"
                },
                {
                  "assignments": [
                    74
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 74,
                      "mutability": "mutable",
                      "name": "lockedCapital",
                      "nameLocation": "1734:13:5",
                      "nodeType": "VariableDeclaration",
                      "scope": 217,
                      "src": "1726:21:5",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 73,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1726:7:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 77,
                  "initialValue": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 75,
                      "name": "getTotalValueLocked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2500,
                      "src": "1750:19:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                        "typeString": "function () view returns (uint256)"
                      }
                    },
                    "id": 76,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1750:21:5",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1726:45:5"
                },
                {
                  "eventCall": {
                    "arguments": [
                      {
                        "id": 79,
                        "name": "activeBundles",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 64,
                        "src": "1822:13:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 80,
                        "name": "_policiesCounter",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 29,
                        "src": "1837:16:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      ],
                      "id": 78,
                      "name": "LogBasicRiskpoolBundlesAndPolicies",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 12,
                      "src": "1787:34:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (uint256,uint256)"
                      }
                    },
                    "id": 81,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1787:67:5",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 82,
                  "nodeType": "EmitStatement",
                  "src": "1782:72:5"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 86,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 84,
                          "name": "activeBundles",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 64,
                          "src": "1872:13:5",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">",
                        "rightExpression": {
                          "hexValue": "30",
                          "id": 85,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1888:1:5",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "1872:17:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "4552524f523a4252502d3030313a4e4f5f4143544956455f42554e444c4553",
                        "id": 87,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1891:33:5",
                        "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": 83,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "1864:7:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 88,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1864:61:5",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 89,
                  "nodeType": "ExpressionStatement",
                  "src": "1864:61:5"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 93,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 91,
                          "name": "capital",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 69,
                          "src": "1943:7:5",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">",
                        "rightExpression": {
                          "id": 92,
                          "name": "lockedCapital",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 74,
                          "src": "1953:13:5",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "1943:23:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "4552524f523a4252502d3030323a4e4f5f465245455f4341504954414c",
                        "id": 94,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1968:31:5",
                        "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": 90,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "1935:7:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 95,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1935:65:5",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 96,
                  "nodeType": "ExpressionStatement",
                  "src": "1935:65:5"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 101,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 97,
                      "name": "capital",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 69,
                      "src": "2073:7:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 100,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 98,
                        "name": "lockedCapital",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 74,
                        "src": "2084:13:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "id": 99,
                        "name": "collateralAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 57,
                        "src": "2100:16:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "2084:32:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2073:43:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 216,
                  "nodeType": "IfStatement",
                  "src": "2070:1776:5",
                  "trueBody": {
                    "id": 215,
                    "nodeType": "Block",
                    "src": "2118:1728:5",
                    "statements": [
                      {
                        "assignments": [
                          106
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 106,
                            "mutability": "mutable",
                            "name": "application",
                            "nameLocation": "2159:11:5",
                            "nodeType": "VariableDeclaration",
                            "scope": 215,
                            "src": "2132:38:5",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Application_$3086_memory_ptr",
                              "typeString": "struct IPolicy.Application"
                            },
                            "typeName": {
                              "id": 105,
                              "nodeType": "UserDefinedTypeName",
                              "pathNode": {
                                "id": 104,
                                "name": "IPolicy.Application",
                                "nodeType": "IdentifierPath",
                                "referencedDeclaration": 3086,
                                "src": "2132:19:5"
                              },
                              "referencedDeclaration": 3086,
                              "src": "2132:19:5",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Application_$3086_storage_ptr",
                                "typeString": "struct IPolicy.Application"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 111,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 109,
                              "name": "processId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 55,
                              "src": "2205:9:5",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "expression": {
                              "id": 107,
                              "name": "_instanceService",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1890,
                              "src": "2173:16:5",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IInstanceService_$4333",
                                "typeString": "contract IInstanceService"
                              }
                            },
                            "id": 108,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getApplication",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4260,
                            "src": "2173:31:5",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_struct$_Application_$3086_memory_ptr_$",
                              "typeString": "function (bytes32) view external returns (struct IPolicy.Application memory)"
                            }
                          },
                          "id": 110,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2173:42:5",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_Application_$3086_memory_ptr",
                            "typeString": "struct IPolicy.Application memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2132:83:5"
                      },
                      {
                        "assignments": [
                          113
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 113,
                            "mutability": "mutable",
                            "name": "idx",
                            "nameLocation": "2313:3:5",
                            "nodeType": "VariableDeclaration",
                            "scope": 215,
                            "src": "2308:8:5",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 112,
                              "name": "uint",
                              "nodeType": "ElementaryTypeName",
                              "src": "2308:4:5",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 117,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 116,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 114,
                            "name": "_policiesCounter",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 29,
                            "src": "2319:16:5",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint32",
                              "typeString": "uint32"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "%",
                          "rightExpression": {
                            "id": 115,
                            "name": "activeBundles",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 64,
                            "src": "2338:13:5",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2319:32:5",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2308:43:5"
                      },
                      {
                        "body": {
                          "id": 213,
                          "nodeType": "Block",
                          "src": "2860:976:5",
                          "statements": [
                            {
                              "assignments": [
                                132
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 132,
                                  "mutability": "mutable",
                                  "name": "bundleId",
                                  "nameLocation": "2886:8:5",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 213,
                                  "src": "2878:16:5",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 131,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2878:7:5",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 136,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 134,
                                    "name": "idx",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 113,
                                    "src": "2915:3:5",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 133,
                                  "name": "getActiveBundleId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2457,
                                  "src": "2897:17:5",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256) view returns (uint256)"
                                  }
                                },
                                "id": 135,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2897:22:5",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2878:41:5"
                            },
                            {
                              "assignments": [
                                141
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 141,
                                  "mutability": "mutable",
                                  "name": "bundle",
                                  "nameLocation": "2959:6:5",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 213,
                                  "src": "2937:28:5",
                                  "stateVariable": false,
                                  "storageLocation": "memory",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_Bundle_$2760_memory_ptr",
                                    "typeString": "struct IBundle.Bundle"
                                  },
                                  "typeName": {
                                    "id": 140,
                                    "nodeType": "UserDefinedTypeName",
                                    "pathNode": {
                                      "id": 139,
                                      "name": "IBundle.Bundle",
                                      "nodeType": "IdentifierPath",
                                      "referencedDeclaration": 2760,
                                      "src": "2937:14:5"
                                    },
                                    "referencedDeclaration": 2760,
                                    "src": "2937:14:5",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_Bundle_$2760_storage_ptr",
                                      "typeString": "struct IBundle.Bundle"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 146,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 144,
                                    "name": "bundleId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 132,
                                    "src": "2995:8:5",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 142,
                                    "name": "_instanceService",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1890,
                                    "src": "2968:16:5",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IInstanceService_$4333",
                                      "typeString": "contract IInstanceService"
                                    }
                                  },
                                  "id": 143,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "getBundle",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4232,
                                  "src": "2968:26:5",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_struct$_Bundle_$2760_memory_ptr_$",
                                    "typeString": "function (uint256) view external returns (struct IBundle.Bundle memory)"
                                  }
                                },
                                "id": 145,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2968:36:5",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_Bundle_$2760_memory_ptr",
                                  "typeString": "struct IBundle.Bundle memory"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2937:67:5"
                            },
                            {
                              "assignments": [
                                148
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 148,
                                  "mutability": "mutable",
                                  "name": "isMatching",
                                  "nameLocation": "3027:10:5",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 213,
                                  "src": "3022:15:5",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "typeName": {
                                    "id": 147,
                                    "name": "bool",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3022:4:5",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 153,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 150,
                                    "name": "bundle",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 141,
                                    "src": "3065:6:5",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_Bundle_$2760_memory_ptr",
                                      "typeString": "struct IBundle.Bundle memory"
                                    }
                                  },
                                  {
                                    "id": 151,
                                    "name": "application",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 106,
                                    "src": "3073:11:5",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_Application_$3086_memory_ptr",
                                      "typeString": "struct IPolicy.Application memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_struct$_Bundle_$2760_memory_ptr",
                                      "typeString": "struct IBundle.Bundle memory"
                                    },
                                    {
                                      "typeIdentifier": "t_struct$_Application_$3086_memory_ptr",
                                      "typeString": "struct IPolicy.Application memory"
                                    }
                                  ],
                                  "id": 149,
                                  "name": "bundleMatchesApplication",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2546,
                                  "src": "3040:24:5",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_struct$_Bundle_$2760_memory_ptr_$_t_struct$_Application_$3086_memory_ptr_$returns$_t_bool_$",
                                    "typeString": "function (struct IBundle.Bundle memory,struct IPolicy.Application memory) view returns (bool)"
                                  }
                                },
                                "id": 152,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3040:45:5",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3022:63:5"
                            },
                            {
                              "eventCall": {
                                "arguments": [
                                  {
                                    "id": 155,
                                    "name": "bundleId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 132,
                                    "src": "3139:8:5",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 156,
                                    "name": "isMatching",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 148,
                                    "src": "3149:10:5",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  ],
                                  "id": 154,
                                  "name": "LogRiskpoolBundleMatchesPolicy",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 938,
                                  "src": "3108:30:5",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bool_$returns$__$",
                                    "typeString": "function (uint256,bool)"
                                  }
                                },
                                "id": 157,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3108:52:5",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 158,
                              "nodeType": "EmitStatement",
                              "src": "3103:57:5"
                            },
                            {
                              "condition": {
                                "id": 159,
                                "name": "isMatching",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 148,
                                "src": "3183:10:5",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 212,
                              "nodeType": "IfStatement",
                              "src": "3179:643:5",
                              "trueBody": {
                                "id": 211,
                                "nodeType": "Block",
                                "src": "3195:627:5",
                                "statements": [
                                  {
                                    "assignments": [
                                      161
                                    ],
                                    "declarations": [
                                      {
                                        "constant": false,
                                        "id": 161,
                                        "mutability": "mutable",
                                        "name": "maxAmount",
                                        "nameLocation": "3225:9:5",
                                        "nodeType": "VariableDeclaration",
                                        "scope": 211,
                                        "src": "3217:17:5",
                                        "stateVariable": false,
                                        "storageLocation": "default",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "typeName": {
                                          "id": 160,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "3217:7:5",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "visibility": "internal"
                                      }
                                    ],
                                    "id": 167,
                                    "initialValue": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 166,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "expression": {
                                          "id": 162,
                                          "name": "bundle",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 141,
                                          "src": "3237:6:5",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_Bundle_$2760_memory_ptr",
                                            "typeString": "struct IBundle.Bundle memory"
                                          }
                                        },
                                        "id": 163,
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "capital",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 2751,
                                        "src": "3237:14:5",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "-",
                                      "rightExpression": {
                                        "expression": {
                                          "id": 164,
                                          "name": "bundle",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 141,
                                          "src": "3254:6:5",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_Bundle_$2760_memory_ptr",
                                            "typeString": "struct IBundle.Bundle memory"
                                          }
                                        },
                                        "id": 165,
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "lockedCapital",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 2753,
                                        "src": "3254:20:5",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "3237:37:5",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "3217:57:5"
                                  },
                                  {
                                    "eventCall": {
                                      "arguments": [
                                        {
                                          "id": 169,
                                          "name": "idx",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 113,
                                          "src": "3344:3:5",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        {
                                          "id": 170,
                                          "name": "bundleId",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 132,
                                          "src": "3349:8:5",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        {
                                          "id": 171,
                                          "name": "maxAmount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 161,
                                          "src": "3359:9:5",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        {
                                          "id": 172,
                                          "name": "collateralAmount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 57,
                                          "src": "3370:16:5",
                                          "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": 168,
                                        "name": "LogBasicRiskpoolCandidateBundleAmountCheck",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 22,
                                        "src": "3301:42:5",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                                          "typeString": "function (uint256,uint256,uint256,uint256)"
                                        }
                                      },
                                      "id": 173,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "3301:86:5",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 174,
                                    "nodeType": "EmitStatement",
                                    "src": "3296:91:5"
                                  },
                                  {
                                    "condition": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 177,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 175,
                                        "name": "maxAmount",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 161,
                                        "src": "3414:9:5",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": ">=",
                                      "rightExpression": {
                                        "id": 176,
                                        "name": "collateralAmount",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 57,
                                        "src": "3427:16:5",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "3414:29:5",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "falseBody": {
                                      "id": 209,
                                      "nodeType": "Block",
                                      "src": "3724:80:5",
                                      "statements": [
                                        {
                                          "expression": {
                                            "id": 207,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftHandSide": {
                                              "id": 200,
                                              "name": "idx",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 113,
                                              "src": "3750:3:5",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "nodeType": "Assignment",
                                            "operator": "=",
                                            "rightHandSide": {
                                              "commonType": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              "id": 206,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "leftExpression": {
                                                "components": [
                                                  {
                                                    "commonType": {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    },
                                                    "id": 203,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "leftExpression": {
                                                      "id": 201,
                                                      "name": "idx",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 113,
                                                      "src": "3757:3:5",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                      }
                                                    },
                                                    "nodeType": "BinaryOperation",
                                                    "operator": "+",
                                                    "rightExpression": {
                                                      "hexValue": "31",
                                                      "id": 202,
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": true,
                                                      "kind": "number",
                                                      "lValueRequested": false,
                                                      "nodeType": "Literal",
                                                      "src": "3763:1:5",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_rational_1_by_1",
                                                        "typeString": "int_const 1"
                                                      },
                                                      "value": "1"
                                                    },
                                                    "src": "3757:7:5",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  }
                                                ],
                                                "id": 204,
                                                "isConstant": false,
                                                "isInlineArray": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "nodeType": "TupleExpression",
                                                "src": "3756:9:5",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              "nodeType": "BinaryOperation",
                                              "operator": "%",
                                              "rightExpression": {
                                                "id": 205,
                                                "name": "activeBundles",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 64,
                                                "src": "3768:13:5",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              "src": "3756:25:5",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "src": "3750:31:5",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 208,
                                          "nodeType": "ExpressionStatement",
                                          "src": "3750:31:5"
                                        }
                                      ]
                                    },
                                    "id": 210,
                                    "nodeType": "IfStatement",
                                    "src": "3410:394:5",
                                    "trueBody": {
                                      "id": 199,
                                      "nodeType": "Block",
                                      "src": "3445:273:5",
                                      "statements": [
                                        {
                                          "expression": {
                                            "arguments": [
                                              {
                                                "id": 181,
                                                "name": "bundleId",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 132,
                                                "src": "3508:8:5",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              {
                                                "id": 182,
                                                "name": "processId",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 55,
                                                "src": "3518:9:5",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_bytes32",
                                                  "typeString": "bytes32"
                                                }
                                              },
                                              {
                                                "id": 183,
                                                "name": "collateralAmount",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 57,
                                                "src": "3529:16:5",
                                                "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": 178,
                                                "name": "_riskpoolService",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 1893,
                                                "src": "3471:16:5",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_contract$_IRiskpoolService_$4594",
                                                  "typeString": "contract IRiskpoolService"
                                                }
                                              },
                                              "id": 180,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "collateralizePolicy",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": 4559,
                                              "src": "3471:36:5",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bytes32_$_t_uint256_$returns$__$",
                                                "typeString": "function (uint256,bytes32,uint256) external"
                                              }
                                            },
                                            "id": 184,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "3471:75:5",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_tuple$__$",
                                              "typeString": "tuple()"
                                            }
                                          },
                                          "id": 185,
                                          "nodeType": "ExpressionStatement",
                                          "src": "3471:75:5"
                                        },
                                        {
                                          "expression": {
                                            "id": 190,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftHandSide": {
                                              "baseExpression": {
                                                "id": 186,
                                                "name": "_collateralizedBy",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 26,
                                                "src": "3572:17:5",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                                                  "typeString": "mapping(bytes32 => uint256)"
                                                }
                                              },
                                              "id": 188,
                                              "indexExpression": {
                                                "id": 187,
                                                "name": "processId",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 55,
                                                "src": "3590:9:5",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_bytes32",
                                                  "typeString": "bytes32"
                                                }
                                              },
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": true,
                                              "nodeType": "IndexAccess",
                                              "src": "3572:28:5",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "nodeType": "Assignment",
                                            "operator": "=",
                                            "rightHandSide": {
                                              "id": 189,
                                              "name": "bundleId",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 132,
                                              "src": "3603:8:5",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "src": "3572:39:5",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 191,
                                          "nodeType": "ExpressionStatement",
                                          "src": "3572:39:5"
                                        },
                                        {
                                          "expression": {
                                            "id": 194,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftHandSide": {
                                              "id": 192,
                                              "name": "success",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 61,
                                              "src": "3637:7:5",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_bool",
                                                "typeString": "bool"
                                              }
                                            },
                                            "nodeType": "Assignment",
                                            "operator": "=",
                                            "rightHandSide": {
                                              "hexValue": "74727565",
                                              "id": 193,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "kind": "bool",
                                              "lValueRequested": false,
                                              "nodeType": "Literal",
                                              "src": "3647:4:5",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_bool",
                                                "typeString": "bool"
                                              },
                                              "value": "true"
                                            },
                                            "src": "3637:14:5",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_bool",
                                              "typeString": "bool"
                                            }
                                          },
                                          "id": 195,
                                          "nodeType": "ExpressionStatement",
                                          "src": "3637:14:5"
                                        },
                                        {
                                          "expression": {
                                            "id": 197,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "nodeType": "UnaryOperation",
                                            "operator": "++",
                                            "prefix": false,
                                            "src": "3677:18:5",
                                            "subExpression": {
                                              "id": 196,
                                              "name": "_policiesCounter",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 29,
                                              "src": "3677:16:5",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint32",
                                                "typeString": "uint32"
                                              }
                                            },
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint32",
                                              "typeString": "uint32"
                                            }
                                          },
                                          "id": 198,
                                          "nodeType": "ExpressionStatement",
                                          "src": "3677:18:5"
                                        }
                                      ]
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 127,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 124,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 122,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 119,
                              "src": "2824:1:5",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "<",
                            "rightExpression": {
                              "id": 123,
                              "name": "activeBundles",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 64,
                              "src": "2828:13:5",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "2824:17:5",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "id": 126,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "!",
                            "prefix": true,
                            "src": "2845:8:5",
                            "subExpression": {
                              "id": 125,
                              "name": "success",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 61,
                              "src": "2846:7:5",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "2824:29:5",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 214,
                        "initializationExpression": {
                          "assignments": [
                            119
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 119,
                              "mutability": "mutable",
                              "name": "i",
                              "nameLocation": "2817:1:5",
                              "nodeType": "VariableDeclaration",
                              "scope": 214,
                              "src": "2809:9:5",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 118,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2809:7:5",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 121,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 120,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2821:1:5",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2809:13:5"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 129,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "2855:3:5",
                            "subExpression": {
                              "id": 128,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 119,
                              "src": "2855:1:5",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 130,
                          "nodeType": "ExpressionStatement",
                          "src": "2855:3:5"
                        },
                        "nodeType": "ForStatement",
                        "src": "2804:1032:5"
                      }
                    ]
                  }
                }
              ]
            },
            "id": 218,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_lockCollateral",
            "nameLocation": "1504:15:5",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 59,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "1583:8:5"
            },
            "parameters": {
              "id": 58,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 55,
                  "mutability": "mutable",
                  "name": "processId",
                  "nameLocation": "1528:9:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 218,
                  "src": "1520:17:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 54,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1520:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 57,
                  "mutability": "mutable",
                  "name": "collateralAmount",
                  "nameLocation": "1547:16:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 218,
                  "src": "1539:24:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 56,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1539:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1519:45:5"
            },
            "returnParameters": {
              "id": 62,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 61,
                  "mutability": "mutable",
                  "name": "success",
                  "nameLocation": "1613:7:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 218,
                  "src": "1608:12:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 60,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1608:4:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1607:14:5"
            },
            "scope": 288,
            "src": "1495:2357:5",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              2589
            ],
            "body": {
              "id": 240,
              "nodeType": "Block",
              "src": "3947:133:5",
              "statements": [
                {
                  "assignments": [
                    227
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 227,
                      "mutability": "mutable",
                      "name": "bundleId",
                      "nameLocation": "3965:8:5",
                      "nodeType": "VariableDeclaration",
                      "scope": 240,
                      "src": "3957:16:5",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 226,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "3957:7:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 231,
                  "initialValue": {
                    "baseExpression": {
                      "id": 228,
                      "name": "_collateralizedBy",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 26,
                      "src": "3976:17:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                        "typeString": "mapping(bytes32 => uint256)"
                      }
                    },
                    "id": 230,
                    "indexExpression": {
                      "id": 229,
                      "name": "processId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 220,
                      "src": "3994:9:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "3976:28:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3957:47:5"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 235,
                        "name": "bundleId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 227,
                        "src": "4045:8:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 236,
                        "name": "processId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 220,
                        "src": "4055:9:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "id": 237,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 222,
                        "src": "4066:6:5",
                        "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": 232,
                        "name": "_riskpoolService",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1893,
                        "src": "4014:16:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IRiskpoolService_$4594",
                          "typeString": "contract IRiskpoolService"
                        }
                      },
                      "id": 234,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "processPayout",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4577,
                      "src": "4014:30:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bytes32_$_t_uint256_$returns$__$",
                        "typeString": "function (uint256,bytes32,uint256) external"
                      }
                    },
                    "id": 238,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4014:59:5",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 239,
                  "nodeType": "ExpressionStatement",
                  "src": "4014:59:5"
                }
              ]
            },
            "id": 241,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_processPayout",
            "nameLocation": "3867:14:5",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 224,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "3934:8:5"
            },
            "parameters": {
              "id": 223,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 220,
                  "mutability": "mutable",
                  "name": "processId",
                  "nameLocation": "3890:9:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 241,
                  "src": "3882:17:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 219,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3882:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 222,
                  "mutability": "mutable",
                  "name": "amount",
                  "nameLocation": "3909:6:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 241,
                  "src": "3901:14:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 221,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3901:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3881:35:5"
            },
            "returnParameters": {
              "id": 225,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3947:0:5"
            },
            "scope": 288,
            "src": "3858:222:5",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              2582
            ],
            "body": {
              "id": 263,
              "nodeType": "Block",
              "src": "4176:134:5",
              "statements": [
                {
                  "assignments": [
                    250
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 250,
                      "mutability": "mutable",
                      "name": "bundleId",
                      "nameLocation": "4194:8:5",
                      "nodeType": "VariableDeclaration",
                      "scope": 263,
                      "src": "4186:16:5",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 249,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "4186:7:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 254,
                  "initialValue": {
                    "baseExpression": {
                      "id": 251,
                      "name": "_collateralizedBy",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 26,
                      "src": "4205:17:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                        "typeString": "mapping(bytes32 => uint256)"
                      }
                    },
                    "id": 253,
                    "indexExpression": {
                      "id": 252,
                      "name": "processId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 243,
                      "src": "4223:9:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "4205:28:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4186:47:5"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 258,
                        "name": "bundleId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 250,
                        "src": "4275:8:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 259,
                        "name": "processId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 243,
                        "src": "4285:9:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "id": 260,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 245,
                        "src": "4296:6:5",
                        "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": 255,
                        "name": "_riskpoolService",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1893,
                        "src": "4243:16:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IRiskpoolService_$4594",
                          "typeString": "contract IRiskpoolService"
                        }
                      },
                      "id": 257,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "processPremium",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4568,
                      "src": "4243:31:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bytes32_$_t_uint256_$returns$__$",
                        "typeString": "function (uint256,bytes32,uint256) external"
                      }
                    },
                    "id": 261,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4243:60:5",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 262,
                  "nodeType": "ExpressionStatement",
                  "src": "4243:60:5"
                }
              ]
            },
            "id": 264,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_processPremium",
            "nameLocation": "4095:15:5",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 247,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "4163:8:5"
            },
            "parameters": {
              "id": 246,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 243,
                  "mutability": "mutable",
                  "name": "processId",
                  "nameLocation": "4119:9:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 264,
                  "src": "4111:17:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 242,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "4111:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 245,
                  "mutability": "mutable",
                  "name": "amount",
                  "nameLocation": "4138:6:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 264,
                  "src": "4130:14:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 244,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4130:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4110:35:5"
            },
            "returnParameters": {
              "id": 248,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4176:0:5"
            },
            "scope": 288,
            "src": "4086:224:5",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              2596
            ],
            "body": {
              "id": 286,
              "nodeType": "Block",
              "src": "4437:152:5",
              "statements": [
                {
                  "assignments": [
                    273
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 273,
                      "mutability": "mutable",
                      "name": "bundleId",
                      "nameLocation": "4463:8:5",
                      "nodeType": "VariableDeclaration",
                      "scope": 286,
                      "src": "4455:16:5",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 272,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "4455:7:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 277,
                  "initialValue": {
                    "baseExpression": {
                      "id": 274,
                      "name": "_collateralizedBy",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 26,
                      "src": "4474:17:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                        "typeString": "mapping(bytes32 => uint256)"
                      }
                    },
                    "id": 276,
                    "indexExpression": {
                      "id": 275,
                      "name": "processId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 266,
                      "src": "4492:9:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "4474:28:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4455:47:5"
                },
                {
                  "expression": {
                    "id": 284,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 278,
                      "name": "collateralAmount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 270,
                      "src": "4512:16:5",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "arguments": [
                        {
                          "id": 281,
                          "name": "bundleId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 273,
                          "src": "4562:8:5",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 282,
                          "name": "processId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 266,
                          "src": "4572:9:5",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        ],
                        "expression": {
                          "id": 279,
                          "name": "_riskpoolService",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1893,
                          "src": "4531:16:5",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IRiskpoolService_$4594",
                            "typeString": "contract IRiskpoolService"
                          }
                        },
                        "id": 280,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "releasePolicy",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4586,
                        "src": "4531:30:5",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bytes32_$returns$_t_uint256_$",
                          "typeString": "function (uint256,bytes32) external returns (uint256)"
                        }
                      },
                      "id": 283,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4531:51:5",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4512:70:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 285,
                  "nodeType": "ExpressionStatement",
                  "src": "4512:70:5"
                }
              ]
            },
            "id": 287,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_releaseCollateral",
            "nameLocation": "4325:18:5",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 268,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "4381:8:5"
            },
            "parameters": {
              "id": 267,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 266,
                  "mutability": "mutable",
                  "name": "processId",
                  "nameLocation": "4352:9:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 287,
                  "src": "4344:17:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 265,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "4344:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4343:19:5"
            },
            "returnParameters": {
              "id": 271,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 270,
                  "mutability": "mutable",
                  "name": "collateralAmount",
                  "nameLocation": "4414:16:5",
                  "nodeType": "VariableDeclaration",
                  "scope": 287,
                  "src": "4406:24:5",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 269,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4406:7:5",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4405:26:5"
            },
            "scope": 288,
            "src": "4316:273:5",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 289,
        "src": "236:4355:5"
      }
    ],
    "src": "39:4552:5"
  },
  "bytecode": "",
  "bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
  "compiler": {
    "evm_version": "istanbul",
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "version": "0.8.2+commit.661d1103"
  },
  "contractName": "BasicRiskpool",
  "coverageMap": {
    "branches": {},
    "statements": {}
  },
  "dependencies": [
    "Component",
    "OpenZeppelin/openzeppelin-contracts@4.7.3/Context",
    "IAccess",
    "IBundleToken",
    "IComponent",
    "IComponentEvents",
    "IComponentOwnerService",
    "OpenZeppelin/openzeppelin-contracts@4.7.3/IERC165",
    "OpenZeppelin/openzeppelin-contracts@4.7.3/IERC20",
    "OpenZeppelin/openzeppelin-contracts@4.7.3/IERC721",
    "IInstanceOperatorService",
    "IInstanceService",
    "IOracleService",
    "IProductService",
    "IRegistry",
    "IRiskpool",
    "IRiskpoolService",
    "OpenZeppelin/openzeppelin-contracts@4.7.3/Ownable",
    "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": [
    236,
    4591
  ],
  "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": "contracts/components/BasicRiskpool.sol",
  "type": "contract"
}