{
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "index",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "maxAmount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "collateralAmount",
          "type": "uint256"
        }
      ],
      "name": "LogBasicRiskpoolCandidateBundleAmountCheck",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "activeBundles",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "policies",
          "type": "uint256"
        }
      ],
      "name": "LogBasicRiskpoolCapitalCheck",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "activeBundles",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "capital",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "lockedCapital",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "collateralAmount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "bool",
          "name": "capacityIsAvailable",
          "type": "bool"
        }
      ],
      "name": "LogBasicRiskpoolCapitalization",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        }
      ],
      "name": "LogComponentApproved",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        }
      ],
      "name": "LogComponentArchived",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "bytes32",
          "name": "componentName",
          "type": "bytes32"
        },
        {
          "indexed": false,
          "internalType": "enum IComponent.ComponentType",
          "name": "componentType",
          "type": "uint8"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "componentAddress",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "registryAddress",
          "type": "address"
        }
      ],
      "name": "LogComponentCreated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        }
      ],
      "name": "LogComponentDeclined",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        }
      ],
      "name": "LogComponentPaused",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "bytes32",
          "name": "componentName",
          "type": "bytes32"
        },
        {
          "indexed": false,
          "internalType": "enum IComponent.ComponentType",
          "name": "componentType",
          "type": "uint8"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "componentAddress",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        }
      ],
      "name": "LogComponentProposed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        }
      ],
      "name": "LogComponentResumed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "enum IComponent.ComponentState",
          "name": "stateOld",
          "type": "uint8"
        },
        {
          "indexed": false,
          "internalType": "enum IComponent.ComponentState",
          "name": "stateNew",
          "type": "uint8"
        }
      ],
      "name": "LogComponentStateChanged",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        }
      ],
      "name": "LogComponentSuspended",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        }
      ],
      "name": "LogComponentUnpaused",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "numberOfBundles",
          "type": "uint256"
        }
      ],
      "name": "LogMaximumNumberOfActiveBundlesSet",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        }
      ],
      "name": "LogRiskpoolApproved",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        }
      ],
      "name": "LogRiskpoolBundleBurned",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        }
      ],
      "name": "LogRiskpoolBundleClosed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "LogRiskpoolBundleCreated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "LogRiskpoolBundleDefunded",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "LogRiskpoolBundleFunded",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        }
      ],
      "name": "LogRiskpoolBundleLocked",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "bool",
          "name": "isMatching",
          "type": "bool"
        }
      ],
      "name": "LogRiskpoolBundleMatchesPolicy",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        }
      ],
      "name": "LogRiskpoolBundleUnlocked",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "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": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "id",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "riskpoolId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "tokenId",
              "type": "uint256"
            },
            {
              "internalType": "enum IBundle.BundleState",
              "name": "state",
              "type": "uint8"
            },
            {
              "internalType": "bytes",
              "name": "filter",
              "type": "bytes"
            },
            {
              "internalType": "uint256",
              "name": "capital",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "lockedCapital",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "balance",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "createdAt",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "updatedAt",
              "type": "uint256"
            }
          ],
          "internalType": "struct IBundle.Bundle",
          "name": "bundle",
          "type": "tuple"
        },
        {
          "components": [
            {
              "internalType": "enum IPolicy.ApplicationState",
              "name": "state",
              "type": "uint8"
            },
            {
              "internalType": "uint256",
              "name": "premiumAmount",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "sumInsuredAmount",
              "type": "uint256"
            },
            {
              "internalType": "bytes",
              "name": "data",
              "type": "bytes"
            },
            {
              "internalType": "uint256",
              "name": "createdAt",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "updatedAt",
              "type": "uint256"
            }
          ],
          "internalType": "struct IPolicy.Application",
          "name": "application",
          "type": "tuple"
        }
      ],
      "name": "bundleMatchesApplication2",
      "outputs": [
        {
          "internalType": "bool",
          "name": "isMatching",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "bundles",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        }
      ],
      "name": "burnBundle",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "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": "getActiveBundleIds",
      "outputs": [
        {
          "internalType": "uint256[]",
          "name": "activeBundleIds",
          "type": "uint256[]"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        }
      ],
      "name": "getActivePolicies",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "activePolicies",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "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": [
        {
          "internalType": "uint256",
          "name": "idx",
          "type": "uint256"
        }
      ],
      "name": "getBundleId",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "bundleId",
          "type": "uint256"
        }
      ],
      "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": [
        {
          "internalType": "uint256",
          "name": "firstBundleId",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "secondBundleId",
          "type": "uint256"
        }
      ],
      "name": "isHigherPriorityBundle",
      "outputs": [
        {
          "internalType": "bool",
          "name": "firstBundleIsHigherPriority",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "isOracle",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "isProduct",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "isRiskpool",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "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",
    "11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
    "15": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
    "26": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol",
    "27": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
    "30": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol",
    "33": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
    "35": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol",
    "38": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol",
    "4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
    "40": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IComponentOwnerService.sol",
    "41": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceOperatorService.sol",
    "42": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol",
    "43": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IOracleService.sol",
    "44": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol",
    "45": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol",
    "46": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol",
    "57": "contracts/gif/BasicRiskpool2.sol",
    "58": "contracts/gif/Riskpool2.sol",
    "7": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol"
  },
  "ast": {
    "absolutePath": "contracts/gif/BasicRiskpool2.sol",
    "exportedSymbols": {
      "BasicRiskpool2": [
        6413
      ],
      "Component": [
        14352
      ],
      "Context": [
        15648
      ],
      "IAccess": [
        22927
      ],
      "IBundle": [
        13382
      ],
      "IBundleToken": [
        13428
      ],
      "IComponent": [
        11675
      ],
      "IComponentEvents": [
        22980
      ],
      "IComponentOwnerService": [
        23015
      ],
      "IERC165": [
        22864
      ],
      "IERC20": [
        15820
      ],
      "IERC20Metadata": [
        9510
      ],
      "IERC721": [
        13932
      ],
      "IInstanceOperatorService": [
        23282
      ],
      "IInstanceService": [
        14934
      ],
      "IOracleService": [
        23292
      ],
      "IPolicy": [
        12649
      ],
      "IPool": [
        23131
      ],
      "IProductService": [
        22121
      ],
      "IRegistry": [
        21976
      ],
      "IRiskpool": [
        14585
      ],
      "IRiskpoolService": [
        15040
      ],
      "ITreasury": [
        12909
      ],
      "Ownable": [
        9476
      ],
      "Riskpool2": [
        7300
      ]
    },
    "id": 6414,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 5842,
        "literals": [
          "solidity",
          "0.8",
          ".2"
        ],
        "nodeType": "PragmaDirective",
        "src": "39:22:57"
      },
      {
        "absolutePath": "contracts/gif/Riskpool2.sol",
        "file": "./Riskpool2.sol",
        "id": 5843,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 6414,
        "sourceUnit": 7301,
        "src": "63:25:57",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IBundle.sol",
        "file": "@etherisc/gif-interface/contracts/modules/IBundle.sol",
        "id": 5844,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 6414,
        "sourceUnit": 13383,
        "src": "89:63:57",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol",
        "file": "@etherisc/gif-interface/contracts/modules/IPolicy.sol",
        "id": 5845,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 6414,
        "sourceUnit": 12650,
        "src": "153:63:57",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": true,
        "baseContracts": [
          {
            "baseName": {
              "id": 5846,
              "name": "Riskpool2",
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 7300,
              "src": "335:9:57"
            },
            "id": 5847,
            "nodeType": "InheritanceSpecifier",
            "src": "335:9:57"
          }
        ],
        "contractDependencies": [
          7300,
          9476,
          11675,
          14352,
          14585,
          15648,
          22980
        ],
        "contractKind": "contract",
        "fullyImplemented": false,
        "id": 6413,
        "linearizedBaseContracts": [
          6413,
          7300,
          14352,
          9476,
          15648,
          22980,
          14585,
          11675
        ],
        "name": "BasicRiskpool2",
        "nameLocation": "317:14:57",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "anonymous": false,
            "id": 5853,
            "name": "LogBasicRiskpoolCapitalCheck",
            "nameLocation": "358:28:57",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 5852,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5849,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "activeBundles",
                  "nameLocation": "395:13:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5853,
                  "src": "387:21:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5848,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "387:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5851,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "policies",
                  "nameLocation": "418:8:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5853,
                  "src": "410:16:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5850,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "410:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "386:41:57"
            },
            "src": "352:76:57"
          },
          {
            "anonymous": false,
            "id": 5865,
            "name": "LogBasicRiskpoolCapitalization",
            "nameLocation": "439:30:57",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 5864,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5855,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "activeBundles",
                  "nameLocation": "478:13:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5865,
                  "src": "470:21:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5854,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "470:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5857,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "capital",
                  "nameLocation": "501:7:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5865,
                  "src": "493:15:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5856,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "493:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5859,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "lockedCapital",
                  "nameLocation": "518:13:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5865,
                  "src": "510:21:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5858,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "510:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5861,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "collateralAmount",
                  "nameLocation": "541:16:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5865,
                  "src": "533:24:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5860,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "533:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5863,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "capacityIsAvailable",
                  "nameLocation": "564:19:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5865,
                  "src": "559:24:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5862,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "559:4:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "469:115:57"
            },
            "src": "433:152:57"
          },
          {
            "anonymous": false,
            "id": 5875,
            "name": "LogBasicRiskpoolCandidateBundleAmountCheck",
            "nameLocation": "596:42:57",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 5874,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5867,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "index",
                  "nameLocation": "647:5:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5875,
                  "src": "639:13:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5866,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "639:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5869,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "bundleId",
                  "nameLocation": "662:8:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5875,
                  "src": "654:16:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5868,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "654:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5871,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "maxAmount",
                  "nameLocation": "680:9:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5875,
                  "src": "672:17:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5870,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "672:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5873,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "collateralAmount",
                  "nameLocation": "699:16:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5875,
                  "src": "691:24:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5872,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "691:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "638:78:57"
            },
            "src": "590:127:57"
          },
          {
            "constant": false,
            "id": 5879,
            "mutability": "mutable",
            "name": "_collateralizedBy",
            "nameLocation": "945:17:57",
            "nodeType": "VariableDeclaration",
            "scope": 6413,
            "src": "876:86:57",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
              "typeString": "mapping(bytes32 => uint256)"
            },
            "typeName": {
              "id": 5878,
              "keyType": {
                "id": 5876,
                "name": "bytes32",
                "nodeType": "ElementaryTypeName",
                "src": "884:7:57",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes32",
                  "typeString": "bytes32"
                }
              },
              "nodeType": "Mapping",
              "src": "876:59:57",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                "typeString": "mapping(bytes32 => uint256)"
              },
              "valueType": {
                "id": 5877,
                "name": "uint256",
                "nodeType": "ElementaryTypeName",
                "src": "911:7:57",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                }
              }
            },
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 5882,
            "mutability": "mutable",
            "name": "_policiesCounter",
            "nameLocation": "983:16:57",
            "nodeType": "VariableDeclaration",
            "scope": 6413,
            "src": "968:35:57",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint32",
              "typeString": "uint32"
            },
            "typeName": {
              "id": 5880,
              "name": "uint32",
              "nodeType": "ElementaryTypeName",
              "src": "968:6:57",
              "typeDescriptions": {
                "typeIdentifier": "t_uint32",
                "typeString": "uint32"
              }
            },
            "value": {
              "hexValue": "30",
              "id": 5881,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "1002:1:57",
              "typeDescriptions": {
                "typeIdentifier": "t_rational_0_by_1",
                "typeString": "int_const 0"
              },
              "value": "0"
            },
            "visibility": "private"
          },
          {
            "constant": false,
            "id": 5885,
            "mutability": "mutable",
            "name": "_activeBundleIds",
            "nameLocation": "1077:16:57",
            "nodeType": "VariableDeclaration",
            "scope": 6413,
            "src": "1059:34:57",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
              "typeString": "uint256[]"
            },
            "typeName": {
              "baseType": {
                "id": 5883,
                "name": "uint256",
                "nodeType": "ElementaryTypeName",
                "src": "1059:7:57",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                }
              },
              "id": 5884,
              "nodeType": "ArrayTypeName",
              "src": "1059:9:57",
              "typeDescriptions": {
                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                "typeString": "uint256[]"
              }
            },
            "visibility": "private"
          },
          {
            "constant": false,
            "id": 5889,
            "mutability": "mutable",
            "name": "_activePoliciesForBundle",
            "nameLocation": "1234:24:57",
            "nodeType": "VariableDeclaration",
            "scope": 6413,
            "src": "1159:99:57",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
              "typeString": "mapping(uint256 => uint256)"
            },
            "typeName": {
              "id": 5888,
              "keyType": {
                "id": 5886,
                "name": "uint256",
                "nodeType": "ElementaryTypeName",
                "src": "1167:7:57",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                }
              },
              "nodeType": "Mapping",
              "src": "1159:66:57",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
                "typeString": "mapping(uint256 => uint256)"
              },
              "valueType": {
                "id": 5887,
                "name": "uint256",
                "nodeType": "ElementaryTypeName",
                "src": "1193:7:57",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                }
              }
            },
            "visibility": "private"
          },
          {
            "body": {
              "id": 5912,
              "nodeType": "Block",
              "src": "1551:3:57",
              "statements": []
            },
            "id": 5913,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 5904,
                    "name": "name",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5891,
                    "src": "1472:4:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  {
                    "id": 5905,
                    "name": "collateralization",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5893,
                    "src": "1478:17:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "id": 5906,
                    "name": "sumOfSumInsuredCap",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5895,
                    "src": "1497:18:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "id": 5907,
                    "name": "erc20Token",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5897,
                    "src": "1517:10:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  {
                    "id": 5908,
                    "name": "wallet",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5899,
                    "src": "1529:6:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  {
                    "id": 5909,
                    "name": "registry",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5901,
                    "src": "1537:8:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 5910,
                "modifierName": {
                  "id": 5903,
                  "name": "Riskpool2",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 7300,
                  "src": "1462:9:57"
                },
                "nodeType": "ModifierInvocation",
                "src": "1462:84:57"
              }
            ],
            "name": "",
            "nameLocation": "-1:-1:-1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5902,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5891,
                  "mutability": "mutable",
                  "name": "name",
                  "nameLocation": "1294:4:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5913,
                  "src": "1286:12:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 5890,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1286:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5893,
                  "mutability": "mutable",
                  "name": "collateralization",
                  "nameLocation": "1316:17:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5913,
                  "src": "1308:25:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5892,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1308:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5895,
                  "mutability": "mutable",
                  "name": "sumOfSumInsuredCap",
                  "nameLocation": "1351:18:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5913,
                  "src": "1343:26:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5894,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1343:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5897,
                  "mutability": "mutable",
                  "name": "erc20Token",
                  "nameLocation": "1387:10:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5913,
                  "src": "1379:18:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5896,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1379:7:57",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5899,
                  "mutability": "mutable",
                  "name": "wallet",
                  "nameLocation": "1415:6:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5913,
                  "src": "1407:14:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5898,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1407:7:57",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5901,
                  "mutability": "mutable",
                  "name": "registry",
                  "nameLocation": "1439:8:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 5913,
                  "src": "1431:16:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5900,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1431:7:57",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1276:177:57"
            },
            "returnParameters": {
              "id": 5911,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1551:0:57"
            },
            "scope": 6413,
            "src": "1265:289:57",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              7278
            ],
            "body": {
              "id": 6071,
              "nodeType": "Block",
              "src": "2099:1992:57",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 5927,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "expression": {
                            "id": 5924,
                            "name": "_activeBundleIds",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5885,
                            "src": "2117:16:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                              "typeString": "uint256[] storage ref"
                            }
                          },
                          "id": 5925,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "src": "2117:23:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">",
                        "rightExpression": {
                          "hexValue": "30",
                          "id": 5926,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2143:1:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "2117:27:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "4552524f523a4252502d3030313a4e4f5f4143544956455f42554e444c4553",
                        "id": 5928,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2146:33:57",
                        "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": 5923,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "2109:7:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 5929,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2109:71:57",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5930,
                  "nodeType": "ExpressionStatement",
                  "src": "2109:71:57"
                },
                {
                  "assignments": [
                    5932
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5932,
                      "mutability": "mutable",
                      "name": "capital",
                      "nameLocation": "2199:7:57",
                      "nodeType": "VariableDeclaration",
                      "scope": 6071,
                      "src": "2191:15:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 5931,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2191:7:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 5935,
                  "initialValue": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 5933,
                      "name": "getCapital",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 7130,
                      "src": "2209:10:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                        "typeString": "function () view returns (uint256)"
                      }
                    },
                    "id": 5934,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2209:12:57",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2191:30:57"
                },
                {
                  "assignments": [
                    5937
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5937,
                      "mutability": "mutable",
                      "name": "lockedCapital",
                      "nameLocation": "2239:13:57",
                      "nodeType": "VariableDeclaration",
                      "scope": 6071,
                      "src": "2231:21:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 5936,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2231:7:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 5940,
                  "initialValue": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 5938,
                      "name": "getTotalValueLocked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 7147,
                      "src": "2255:19:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                        "typeString": "function () view returns (uint256)"
                      }
                    },
                    "id": 5939,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2255:21:57",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2231:45:57"
                },
                {
                  "assignments": [
                    5942
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5942,
                      "mutability": "mutable",
                      "name": "capacityIsAvailable",
                      "nameLocation": "2291:19:57",
                      "nodeType": "VariableDeclaration",
                      "scope": 6071,
                      "src": "2286:24:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 5941,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "2286:4:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 5948,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 5947,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 5943,
                      "name": "capital",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5932,
                      "src": "2313:7:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 5946,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 5944,
                        "name": "lockedCapital",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5937,
                        "src": "2323:13:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "id": 5945,
                        "name": "collateralAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5917,
                        "src": "2339:16:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "2323:32:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2313:42:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2286:69:57"
                },
                {
                  "eventCall": {
                    "arguments": [
                      {
                        "expression": {
                          "id": 5950,
                          "name": "_activeBundleIds",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5885,
                          "src": "2415:16:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                            "typeString": "uint256[] storage ref"
                          }
                        },
                        "id": 5951,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "2415:23:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 5952,
                        "name": "capital",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5932,
                        "src": "2452:7:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 5953,
                        "name": "lockedCapital",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5937,
                        "src": "2473:13:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 5954,
                        "name": "collateralAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5917,
                        "src": "2501:16:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 5955,
                        "name": "capacityIsAvailable",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5942,
                        "src": "2531:19:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 5949,
                      "name": "LogBasicRiskpoolCapitalization",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5865,
                      "src": "2371:30:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$returns$__$",
                        "typeString": "function (uint256,uint256,uint256,uint256,bool)"
                      }
                    },
                    "id": 5956,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2371:180:57",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5957,
                  "nodeType": "EmitStatement",
                  "src": "2366:185:57"
                },
                {
                  "condition": {
                    "id": 5959,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "2624:20:57",
                    "subExpression": {
                      "id": 5958,
                      "name": "capacityIsAvailable",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5942,
                      "src": "2625:19:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 5963,
                  "nodeType": "IfStatement",
                  "src": "2621:62:57",
                  "trueBody": {
                    "id": 5962,
                    "nodeType": "Block",
                    "src": "2646:37:57",
                    "statements": [
                      {
                        "expression": {
                          "hexValue": "66616c7365",
                          "id": 5960,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2667:5:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 5922,
                        "id": 5961,
                        "nodeType": "Return",
                        "src": "2660:12:57"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "id": 5966,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 5964,
                      "name": "success",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5921,
                      "src": "2724:7:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "hexValue": "66616c7365",
                      "id": 5965,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "bool",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2734:5:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "value": "false"
                    },
                    "src": "2724:15:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 5967,
                  "nodeType": "ExpressionStatement",
                  "src": "2724:15:57"
                },
                {
                  "assignments": [
                    5972
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5972,
                      "mutability": "mutable",
                      "name": "application",
                      "nameLocation": "2777:11:57",
                      "nodeType": "VariableDeclaration",
                      "scope": 6071,
                      "src": "2750:38:57",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Application_$12478_memory_ptr",
                        "typeString": "struct IPolicy.Application"
                      },
                      "typeName": {
                        "id": 5971,
                        "nodeType": "UserDefinedTypeName",
                        "pathNode": {
                          "id": 5970,
                          "name": "IPolicy.Application",
                          "nodeType": "IdentifierPath",
                          "referencedDeclaration": 12478,
                          "src": "2750:19:57"
                        },
                        "referencedDeclaration": 12478,
                        "src": "2750:19:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Application_$12478_storage_ptr",
                          "typeString": "struct IPolicy.Application"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 5977,
                  "initialValue": {
                    "arguments": [
                      {
                        "id": 5975,
                        "name": "processId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5915,
                        "src": "2823:9:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "expression": {
                        "id": 5973,
                        "name": "_instanceService",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6470,
                        "src": "2791:16:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IInstanceService_$14934",
                          "typeString": "contract IInstanceService"
                        }
                      },
                      "id": 5974,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getApplication",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 14861,
                      "src": "2791:31:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_struct$_Application_$12478_memory_ptr_$",
                        "typeString": "function (bytes32) view external returns (struct IPolicy.Application memory)"
                      }
                    },
                    "id": 5976,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2791:42:57",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Application_$12478_memory_ptr",
                      "typeString": "struct IPolicy.Application memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2750:83:57"
                },
                {
                  "body": {
                    "id": 6069,
                    "nodeType": "Block",
                    "src": "3082:1003:57",
                    "statements": [
                      {
                        "assignments": [
                          5993
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 5993,
                            "mutability": "mutable",
                            "name": "bundleId",
                            "nameLocation": "3104:8:57",
                            "nodeType": "VariableDeclaration",
                            "scope": 6069,
                            "src": "3096:16:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 5992,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3096:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 5997,
                        "initialValue": {
                          "baseExpression": {
                            "id": 5994,
                            "name": "_activeBundleIds",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5885,
                            "src": "3115:16:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                              "typeString": "uint256[] storage ref"
                            }
                          },
                          "id": 5996,
                          "indexExpression": {
                            "id": 5995,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5979,
                            "src": "3132:1:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "3115:19:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3096:38:57"
                      },
                      {
                        "assignments": [
                          6002
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 6002,
                            "mutability": "mutable",
                            "name": "bundle",
                            "nameLocation": "3234:6:57",
                            "nodeType": "VariableDeclaration",
                            "scope": 6069,
                            "src": "3212:28:57",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Bundle_$13298_memory_ptr",
                              "typeString": "struct IBundle.Bundle"
                            },
                            "typeName": {
                              "id": 6001,
                              "nodeType": "UserDefinedTypeName",
                              "pathNode": {
                                "id": 6000,
                                "name": "IBundle.Bundle",
                                "nodeType": "IdentifierPath",
                                "referencedDeclaration": 13298,
                                "src": "3212:14:57"
                              },
                              "referencedDeclaration": 13298,
                              "src": "3212:14:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Bundle_$13298_storage_ptr",
                                "typeString": "struct IBundle.Bundle"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 6007,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 6005,
                              "name": "bundleId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5993,
                              "src": "3270:8:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 6003,
                              "name": "_instanceService",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6470,
                              "src": "3243:16:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IInstanceService_$14934",
                                "typeString": "contract IInstanceService"
                              }
                            },
                            "id": 6004,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getBundle",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 14833,
                            "src": "3243:26:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_struct$_Bundle_$13298_memory_ptr_$",
                              "typeString": "function (uint256) view external returns (struct IBundle.Bundle memory)"
                            }
                          },
                          "id": 6006,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3243:36:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_Bundle_$13298_memory_ptr",
                            "typeString": "struct IBundle.Bundle memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3212:67:57"
                      },
                      {
                        "assignments": [
                          6009
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 6009,
                            "mutability": "mutable",
                            "name": "isMatching",
                            "nameLocation": "3298:10:57",
                            "nodeType": "VariableDeclaration",
                            "scope": 6069,
                            "src": "3293:15:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "typeName": {
                              "id": 6008,
                              "name": "bool",
                              "nodeType": "ElementaryTypeName",
                              "src": "3293:4:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 6014,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 6011,
                              "name": "bundle",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6002,
                              "src": "3337:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Bundle_$13298_memory_ptr",
                                "typeString": "struct IBundle.Bundle memory"
                              }
                            },
                            {
                              "id": 6012,
                              "name": "application",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5972,
                              "src": "3345:11:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Application_$12478_memory_ptr",
                                "typeString": "struct IPolicy.Application memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_Bundle_$13298_memory_ptr",
                                "typeString": "struct IBundle.Bundle memory"
                              },
                              {
                                "typeIdentifier": "t_struct$_Application_$12478_memory_ptr",
                                "typeString": "struct IPolicy.Application memory"
                              }
                            ],
                            "id": 6010,
                            "name": "bundleMatchesApplication2",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6083,
                            "src": "3311:25:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bundle_$13298_memory_ptr_$_t_struct$_Application_$12478_memory_ptr_$returns$_t_bool_$",
                              "typeString": "function (struct IBundle.Bundle memory,struct IPolicy.Application memory) returns (bool)"
                            }
                          },
                          "id": 6013,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3311:46:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3293:64:57"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 6016,
                              "name": "bundleId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5993,
                              "src": "3407:8:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 6017,
                              "name": "isMatching",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6009,
                              "src": "3417:10:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 6015,
                            "name": "LogRiskpoolBundleMatchesPolicy",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14387,
                            "src": "3376:30:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bool_$returns$__$",
                              "typeString": "function (uint256,bool)"
                            }
                          },
                          "id": 6018,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3376:52:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6019,
                        "nodeType": "EmitStatement",
                        "src": "3371:57:57"
                      },
                      {
                        "condition": {
                          "id": 6020,
                          "name": "isMatching",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6009,
                          "src": "3447:10:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 6068,
                        "nodeType": "IfStatement",
                        "src": "3443:632:57",
                        "trueBody": {
                          "id": 6067,
                          "nodeType": "Block",
                          "src": "3459:616:57",
                          "statements": [
                            {
                              "assignments": [
                                6022
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 6022,
                                  "mutability": "mutable",
                                  "name": "maxAmount",
                                  "nameLocation": "3485:9:57",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 6067,
                                  "src": "3477:17:57",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 6021,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3477:7:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 6028,
                              "initialValue": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 6027,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "id": 6023,
                                    "name": "bundle",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6002,
                                    "src": "3497:6:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_Bundle_$13298_memory_ptr",
                                      "typeString": "struct IBundle.Bundle memory"
                                    }
                                  },
                                  "id": 6024,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "capital",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 13289,
                                  "src": "3497:14:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "expression": {
                                    "id": 6025,
                                    "name": "bundle",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6002,
                                    "src": "3514:6:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_Bundle_$13298_memory_ptr",
                                      "typeString": "struct IBundle.Bundle memory"
                                    }
                                  },
                                  "id": 6026,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "lockedCapital",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 13291,
                                  "src": "3514:20:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3497:37:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3477:57:57"
                            },
                            {
                              "eventCall": {
                                "arguments": [
                                  {
                                    "id": 6030,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5979,
                                    "src": "3600:1:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 6031,
                                    "name": "bundleId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5993,
                                    "src": "3603:8:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 6032,
                                    "name": "maxAmount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6022,
                                    "src": "3613:9:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 6033,
                                    "name": "collateralAmount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5917,
                                    "src": "3624:16:57",
                                    "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": 6029,
                                  "name": "LogBasicRiskpoolCandidateBundleAmountCheck",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5875,
                                  "src": "3557:42:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                                    "typeString": "function (uint256,uint256,uint256,uint256)"
                                  }
                                },
                                "id": 6034,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3557:84:57",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 6035,
                              "nodeType": "EmitStatement",
                              "src": "3552:89:57"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 6038,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 6036,
                                  "name": "maxAmount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6022,
                                  "src": "3664:9:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">=",
                                "rightExpression": {
                                  "id": 6037,
                                  "name": "collateralAmount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5917,
                                  "src": "3677:16:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3664:29:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 6066,
                              "nodeType": "IfStatement",
                              "src": "3660:401:57",
                              "trueBody": {
                                "id": 6065,
                                "nodeType": "Block",
                                "src": "3695:366:57",
                                "statements": [
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "id": 6042,
                                          "name": "bundleId",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 5993,
                                          "src": "3754:8:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        {
                                          "id": 6043,
                                          "name": "processId",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 5915,
                                          "src": "3764:9:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bytes32",
                                            "typeString": "bytes32"
                                          }
                                        },
                                        {
                                          "id": 6044,
                                          "name": "collateralAmount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 5917,
                                          "src": "3775:16:57",
                                          "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": 6039,
                                          "name": "_riskpoolService",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 6473,
                                          "src": "3717:16:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IRiskpoolService_$15040",
                                            "typeString": "contract IRiskpoolService"
                                          }
                                        },
                                        "id": 6041,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "collateralizePolicy",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 15005,
                                        "src": "3717:36:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bytes32_$_t_uint256_$returns$__$",
                                          "typeString": "function (uint256,bytes32,uint256) external"
                                        }
                                      },
                                      "id": 6045,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "3717:75:57",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 6046,
                                    "nodeType": "ExpressionStatement",
                                    "src": "3717:75:57"
                                  },
                                  {
                                    "expression": {
                                      "id": 6051,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "baseExpression": {
                                          "id": 6047,
                                          "name": "_collateralizedBy",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 5879,
                                          "src": "3814:17:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                                            "typeString": "mapping(bytes32 => uint256)"
                                          }
                                        },
                                        "id": 6049,
                                        "indexExpression": {
                                          "id": 6048,
                                          "name": "processId",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 5915,
                                          "src": "3832:9:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bytes32",
                                            "typeString": "bytes32"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": true,
                                        "nodeType": "IndexAccess",
                                        "src": "3814:28:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "id": 6050,
                                        "name": "bundleId",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 5993,
                                        "src": "3845:8:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "3814:39:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 6052,
                                    "nodeType": "ExpressionStatement",
                                    "src": "3814:39:57"
                                  },
                                  {
                                    "expression": {
                                      "id": 6055,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 6053,
                                        "name": "success",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 5921,
                                        "src": "3875:7:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "hexValue": "74727565",
                                        "id": 6054,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "bool",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "3885:4:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        },
                                        "value": "true"
                                      },
                                      "src": "3875:14:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "id": 6056,
                                    "nodeType": "ExpressionStatement",
                                    "src": "3875:14:57"
                                  },
                                  {
                                    "expression": {
                                      "id": 6058,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "UnaryOperation",
                                      "operator": "++",
                                      "prefix": false,
                                      "src": "3911:18:57",
                                      "subExpression": {
                                        "id": 6057,
                                        "name": "_policiesCounter",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 5882,
                                        "src": "3911:16:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint32",
                                          "typeString": "uint32"
                                        }
                                      },
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint32",
                                        "typeString": "uint32"
                                      }
                                    },
                                    "id": 6059,
                                    "nodeType": "ExpressionStatement",
                                    "src": "3911:18:57"
                                  },
                                  {
                                    "expression": {
                                      "id": 6063,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "UnaryOperation",
                                      "operator": "++",
                                      "prefix": false,
                                      "src": "4006:36:57",
                                      "subExpression": {
                                        "baseExpression": {
                                          "id": 6060,
                                          "name": "_activePoliciesForBundle",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 5889,
                                          "src": "4006:24:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
                                            "typeString": "mapping(uint256 => uint256)"
                                          }
                                        },
                                        "id": 6062,
                                        "indexExpression": {
                                          "id": 6061,
                                          "name": "bundleId",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 5993,
                                          "src": "4031:8:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": true,
                                        "nodeType": "IndexAccess",
                                        "src": "4006:34:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 6064,
                                    "nodeType": "ExpressionStatement",
                                    "src": "4006:36:57"
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 5988,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 5985,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 5982,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5979,
                        "src": "3036:1:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "<",
                      "rightExpression": {
                        "expression": {
                          "id": 5983,
                          "name": "_activeBundleIds",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5885,
                          "src": "3040:16:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                            "typeString": "uint256[] storage ref"
                          }
                        },
                        "id": 5984,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "3040:23:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3036:27:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "id": 5987,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "!",
                      "prefix": true,
                      "src": "3067:8:57",
                      "subExpression": {
                        "id": 5986,
                        "name": "success",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5921,
                        "src": "3068:7:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "3036:39:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6070,
                  "initializationExpression": {
                    "assignments": [
                      5979
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 5979,
                        "mutability": "mutable",
                        "name": "i",
                        "nameLocation": "3029:1:57",
                        "nodeType": "VariableDeclaration",
                        "scope": 6070,
                        "src": "3021:9:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5978,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3021:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "id": 5981,
                    "initialValue": {
                      "hexValue": "30",
                      "id": 5980,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3033:1:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "3021:13:57"
                  },
                  "loopExpression": {
                    "expression": {
                      "id": 5990,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "3077:3:57",
                      "subExpression": {
                        "id": 5989,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5979,
                        "src": "3077:1:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 5991,
                    "nodeType": "ExpressionStatement",
                    "src": "3077:3:57"
                  },
                  "nodeType": "ForStatement",
                  "src": "3016:1069:57"
                }
              ]
            },
            "id": 6072,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_lockCollateral",
            "nameLocation": "1976:15:57",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 5919,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "2055:8:57"
            },
            "parameters": {
              "id": 5918,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5915,
                  "mutability": "mutable",
                  "name": "processId",
                  "nameLocation": "2000:9:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6072,
                  "src": "1992:17:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 5914,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1992:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5917,
                  "mutability": "mutable",
                  "name": "collateralAmount",
                  "nameLocation": "2019:16:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6072,
                  "src": "2011:24:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5916,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2011:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1991:45:57"
            },
            "returnParameters": {
              "id": 5922,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5921,
                  "mutability": "mutable",
                  "name": "success",
                  "nameLocation": "2085:7:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6072,
                  "src": "2080:12:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5920,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2080:4:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2079:14:57"
            },
            "scope": 6413,
            "src": "1967:2124:57",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "functionSelector": "da62176b",
            "id": 6083,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "bundleMatchesApplication2",
            "nameLocation": "4118:25:57",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6079,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6075,
                  "mutability": "mutable",
                  "name": "bundle",
                  "nameLocation": "4175:6:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6083,
                  "src": "4153:28:57",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_Bundle_$13298_memory_ptr",
                    "typeString": "struct IBundle.Bundle"
                  },
                  "typeName": {
                    "id": 6074,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 6073,
                      "name": "IBundle.Bundle",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 13298,
                      "src": "4153:14:57"
                    },
                    "referencedDeclaration": 13298,
                    "src": "4153:14:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Bundle_$13298_storage_ptr",
                      "typeString": "struct IBundle.Bundle"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6078,
                  "mutability": "mutable",
                  "name": "application",
                  "nameLocation": "4219:11:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6083,
                  "src": "4192:38:57",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_Application_$12478_memory_ptr",
                    "typeString": "struct IPolicy.Application"
                  },
                  "typeName": {
                    "id": 6077,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 6076,
                      "name": "IPolicy.Application",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 12478,
                      "src": "4192:19:57"
                    },
                    "referencedDeclaration": 12478,
                    "src": "4192:19:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Application_$12478_storage_ptr",
                      "typeString": "struct IPolicy.Application"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4143:93:57"
            },
            "returnParameters": {
              "id": 6082,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6081,
                  "mutability": "mutable",
                  "name": "isMatching",
                  "nameLocation": "4274:10:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6083,
                  "src": "4269:15:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6080,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4269:4:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4268:17:57"
            },
            "scope": 6413,
            "src": "4109:177:57",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "public"
          },
          {
            "baseFunctions": [
              7229
            ],
            "body": {
              "id": 6097,
              "nodeType": "Block",
              "src": "4455:49:57",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6094,
                        "name": "bundleId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6085,
                        "src": "4488:8:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6093,
                      "name": "_addBundleToActiveList",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6239,
                      "src": "4465:22:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 6095,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4465:32:57",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6096,
                  "nodeType": "ExpressionStatement",
                  "src": "4465:32:57"
                }
              ]
            },
            "id": 6098,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_afterCreateBundle",
            "nameLocation": "4348:18:57",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 6091,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "4438:8:57"
            },
            "parameters": {
              "id": 6090,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6085,
                  "mutability": "mutable",
                  "name": "bundleId",
                  "nameLocation": "4375:8:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6098,
                  "src": "4367:16:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6084,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4367:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6087,
                  "mutability": "mutable",
                  "name": "filter",
                  "nameLocation": "4398:6:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6098,
                  "src": "4385:19:57",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6086,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4385:5:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6089,
                  "mutability": "mutable",
                  "name": "initialAmount",
                  "nameLocation": "4414:13:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6098,
                  "src": "4406:21:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6088,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4406:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4366:62:57"
            },
            "returnParameters": {
              "id": 6092,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4455:0:57"
            },
            "scope": 6413,
            "src": "4339:165:57",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              7251
            ],
            "body": {
              "id": 6108,
              "nodeType": "Block",
              "src": "4580:54:57",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6105,
                        "name": "bundleId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6100,
                        "src": "4618:8:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6104,
                      "name": "_removeBundleFromActiveList",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6317,
                      "src": "4590:27:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 6106,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4590:37:57",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6107,
                  "nodeType": "ExpressionStatement",
                  "src": "4590:37:57"
                }
              ]
            },
            "id": 6109,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_afterLockBundle",
            "nameLocation": "4519:16:57",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 6102,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "4563:8:57"
            },
            "parameters": {
              "id": 6101,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6100,
                  "mutability": "mutable",
                  "name": "bundleId",
                  "nameLocation": "4544:8:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6109,
                  "src": "4536:16:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6099,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4536:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4535:18:57"
            },
            "returnParameters": {
              "id": 6103,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4580:0:57"
            },
            "scope": 6413,
            "src": "4510:124:57",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              7257
            ],
            "body": {
              "id": 6119,
              "nodeType": "Block",
              "src": "4711:49:57",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6116,
                        "name": "bundleId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6111,
                        "src": "4744:8:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6115,
                      "name": "_addBundleToActiveList",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6239,
                      "src": "4721:22:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 6117,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4721:32:57",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6118,
                  "nodeType": "ExpressionStatement",
                  "src": "4721:32:57"
                }
              ]
            },
            "id": 6120,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_afterUnlockBundle",
            "nameLocation": "4648:18:57",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 6113,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "4694:8:57"
            },
            "parameters": {
              "id": 6112,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6111,
                  "mutability": "mutable",
                  "name": "bundleId",
                  "nameLocation": "4675:8:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6120,
                  "src": "4667:16:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6110,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4667:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4666:18:57"
            },
            "returnParameters": {
              "id": 6114,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4711:0:57"
            },
            "scope": 6413,
            "src": "4639:121:57",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              7263
            ],
            "body": {
              "id": 6130,
              "nodeType": "Block",
              "src": "4836:54:57",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6127,
                        "name": "bundleId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6122,
                        "src": "4874:8:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6126,
                      "name": "_removeBundleFromActiveList",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6317,
                      "src": "4846:27:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 6128,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4846:37:57",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6129,
                  "nodeType": "ExpressionStatement",
                  "src": "4846:37:57"
                }
              ]
            },
            "id": 6131,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_afterCloseBundle",
            "nameLocation": "4774:17:57",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 6124,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "4819:8:57"
            },
            "parameters": {
              "id": 6123,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6122,
                  "mutability": "mutable",
                  "name": "bundleId",
                  "nameLocation": "4800:8:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6131,
                  "src": "4792:16:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6121,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4792:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4791:18:57"
            },
            "returnParameters": {
              "id": 6125,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4836:0:57"
            },
            "scope": 6413,
            "src": "4765:125:57",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6238,
              "nodeType": "Block",
              "src": "4955:797:57",
              "statements": [
                {
                  "assignments": [
                    6137
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6137,
                      "mutability": "mutable",
                      "name": "found",
                      "nameLocation": "4970:5:57",
                      "nodeType": "VariableDeclaration",
                      "scope": 6238,
                      "src": "4965:10:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 6136,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "4965:4:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6139,
                  "initialValue": {
                    "hexValue": "66616c7365",
                    "id": 6138,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4978:5:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "false"
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4965:18:57"
                },
                {
                  "assignments": [
                    6141
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6141,
                      "mutability": "mutable",
                      "name": "inserted",
                      "nameLocation": "4998:8:57",
                      "nodeType": "VariableDeclaration",
                      "scope": 6238,
                      "src": "4993:13:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 6140,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "4993:4:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6143,
                  "initialValue": {
                    "hexValue": "66616c7365",
                    "id": 6142,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5009:5:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "false"
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4993:21:57"
                },
                {
                  "body": {
                    "id": 6223,
                    "nodeType": "Block",
                    "src": "5102:553:57",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 6165,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6161,
                            "name": "bundleId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6133,
                            "src": "5120:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "baseExpression": {
                              "id": 6162,
                              "name": "_activeBundleIds",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5885,
                              "src": "5132:16:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                "typeString": "uint256[] storage ref"
                              }
                            },
                            "id": 6164,
                            "indexExpression": {
                              "id": 6163,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6145,
                              "src": "5149:1:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "5132:19:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5120:31:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "arguments": [
                              {
                                "id": 6172,
                                "name": "bundleId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6133,
                                "src": "5244:8:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "baseExpression": {
                                  "id": 6173,
                                  "name": "_activeBundleIds",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5885,
                                  "src": "5254:16:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                    "typeString": "uint256[] storage ref"
                                  }
                                },
                                "id": 6175,
                                "indexExpression": {
                                  "id": 6174,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6145,
                                  "src": "5271:1:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "5254:19:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 6171,
                              "name": "isHigherPriorityBundle",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6253,
                              "src": "5221:22:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                                "typeString": "function (uint256,uint256) view returns (bool)"
                              }
                            },
                            "id": 6176,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5221:53:57",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "id": 6221,
                          "nodeType": "IfStatement",
                          "src": "5217:428:57",
                          "trueBody": {
                            "id": 6220,
                            "nodeType": "Block",
                            "src": "5276:369:57",
                            "statements": [
                              {
                                "expression": {
                                  "id": 6179,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "id": 6177,
                                    "name": "inserted",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6141,
                                    "src": "5294:8:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "hexValue": "74727565",
                                    "id": 6178,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "bool",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "5305:4:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    "value": "true"
                                  },
                                  "src": "5294:15:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "id": 6180,
                                "nodeType": "ExpressionStatement",
                                "src": "5294:15:57"
                              },
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "commonType": {
                                        "typeIdentifier": "t_rational_1000000_by_1",
                                        "typeString": "int_const 1000000"
                                      },
                                      "id": 6186,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "hexValue": "3130",
                                        "id": 6184,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5349:2:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_10_by_1",
                                          "typeString": "int_const 10"
                                        },
                                        "value": "10"
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "**",
                                      "rightExpression": {
                                        "hexValue": "36",
                                        "id": 6185,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5353:1:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_6_by_1",
                                          "typeString": "int_const 6"
                                        },
                                        "value": "6"
                                      },
                                      "src": "5349:5:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_1000000_by_1",
                                        "typeString": "int_const 1000000"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_rational_1000000_by_1",
                                        "typeString": "int_const 1000000"
                                      }
                                    ],
                                    "expression": {
                                      "id": 6181,
                                      "name": "_activeBundleIds",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5885,
                                      "src": "5327:16:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                        "typeString": "uint256[] storage ref"
                                      }
                                    },
                                    "id": 6183,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "push",
                                    "nodeType": "MemberAccess",
                                    "src": "5327:21:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_uint256_$dyn_storage_ptr_$_t_uint256_$returns$__$bound_to$_t_array$_t_uint256_$dyn_storage_ptr_$",
                                      "typeString": "function (uint256[] storage pointer,uint256)"
                                    }
                                  },
                                  "id": 6187,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5327:28:57",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 6188,
                                "nodeType": "ExpressionStatement",
                                "src": "5327:28:57"
                              },
                              {
                                "body": {
                                  "id": 6212,
                                  "nodeType": "Block",
                                  "src": "5432:84:57",
                                  "statements": [
                                    {
                                      "expression": {
                                        "id": 6210,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftHandSide": {
                                          "baseExpression": {
                                            "id": 6202,
                                            "name": "_activeBundleIds",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 5885,
                                            "src": "5454:16:57",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                              "typeString": "uint256[] storage ref"
                                            }
                                          },
                                          "id": 6204,
                                          "indexExpression": {
                                            "id": 6203,
                                            "name": "j",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 6190,
                                            "src": "5471:1:57",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": true,
                                          "nodeType": "IndexAccess",
                                          "src": "5454:19:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "nodeType": "Assignment",
                                        "operator": "=",
                                        "rightHandSide": {
                                          "baseExpression": {
                                            "id": 6205,
                                            "name": "_activeBundleIds",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 5885,
                                            "src": "5476:16:57",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                              "typeString": "uint256[] storage ref"
                                            }
                                          },
                                          "id": 6209,
                                          "indexExpression": {
                                            "commonType": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            },
                                            "id": 6208,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftExpression": {
                                              "id": 6206,
                                              "name": "j",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 6190,
                                              "src": "5493:1:57",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "nodeType": "BinaryOperation",
                                            "operator": "-",
                                            "rightExpression": {
                                              "hexValue": "31",
                                              "id": 6207,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "kind": "number",
                                              "lValueRequested": false,
                                              "nodeType": "Literal",
                                              "src": "5495:1:57",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_rational_1_by_1",
                                                "typeString": "int_const 1"
                                              },
                                              "value": "1"
                                            },
                                            "src": "5493:3:57",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "5476:21:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "src": "5454:43:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "id": 6211,
                                      "nodeType": "ExpressionStatement",
                                      "src": "5454:43:57"
                                    }
                                  ]
                                },
                                "condition": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 6198,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 6196,
                                    "name": "j",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6190,
                                    "src": "5420:1:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": ">",
                                  "rightExpression": {
                                    "id": 6197,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6145,
                                    "src": "5424:1:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "5420:5:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "id": 6213,
                                "initializationExpression": {
                                  "assignments": [
                                    6190
                                  ],
                                  "declarations": [
                                    {
                                      "constant": false,
                                      "id": 6190,
                                      "mutability": "mutable",
                                      "name": "j",
                                      "nameLocation": "5387:1:57",
                                      "nodeType": "VariableDeclaration",
                                      "scope": 6213,
                                      "src": "5379:9:57",
                                      "stateVariable": false,
                                      "storageLocation": "default",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "typeName": {
                                        "id": 6189,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "5379:7:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "visibility": "internal"
                                    }
                                  ],
                                  "id": 6195,
                                  "initialValue": {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 6194,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "expression": {
                                        "id": 6191,
                                        "name": "_activeBundleIds",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 5885,
                                        "src": "5391:16:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                          "typeString": "uint256[] storage ref"
                                        }
                                      },
                                      "id": 6192,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "length",
                                      "nodeType": "MemberAccess",
                                      "src": "5391:23:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "-",
                                    "rightExpression": {
                                      "hexValue": "31",
                                      "id": 6193,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "5417:1:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_1_by_1",
                                        "typeString": "int_const 1"
                                      },
                                      "value": "1"
                                    },
                                    "src": "5391:27:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "VariableDeclarationStatement",
                                  "src": "5379:39:57"
                                },
                                "loopExpression": {
                                  "expression": {
                                    "id": 6200,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "UnaryOperation",
                                    "operator": "--",
                                    "prefix": false,
                                    "src": "5427:3:57",
                                    "subExpression": {
                                      "id": 6199,
                                      "name": "j",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6190,
                                      "src": "5427:1:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 6201,
                                  "nodeType": "ExpressionStatement",
                                  "src": "5427:3:57"
                                },
                                "nodeType": "ForStatement",
                                "src": "5374:142:57"
                              },
                              {
                                "expression": {
                                  "id": 6218,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "baseExpression": {
                                      "id": 6214,
                                      "name": "_activeBundleIds",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5885,
                                      "src": "5600:16:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                        "typeString": "uint256[] storage ref"
                                      }
                                    },
                                    "id": 6216,
                                    "indexExpression": {
                                      "id": 6215,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6145,
                                      "src": "5617:1:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": true,
                                    "nodeType": "IndexAccess",
                                    "src": "5600:19:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "id": 6217,
                                    "name": "bundleId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6133,
                                    "src": "5622:8:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "5600:30:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 6219,
                                "nodeType": "ExpressionStatement",
                                "src": "5600:30:57"
                              }
                            ]
                          }
                        },
                        "id": 6222,
                        "nodeType": "IfStatement",
                        "src": "5116:529:57",
                        "trueBody": {
                          "id": 6170,
                          "nodeType": "Block",
                          "src": "5153:45:57",
                          "statements": [
                            {
                              "expression": {
                                "id": 6168,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 6166,
                                  "name": "found",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6137,
                                  "src": "5171:5:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "hexValue": "74727565",
                                  "id": 6167,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "bool",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "5179:4:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "value": "true"
                                },
                                "src": "5171:12:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 6169,
                              "nodeType": "ExpressionStatement",
                              "src": "5171:12:57"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 6157,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "id": 6152,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 6149,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "UnaryOperation",
                        "operator": "!",
                        "prefix": true,
                        "src": "5045:9:57",
                        "subExpression": {
                          "id": 6148,
                          "name": "inserted",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6141,
                          "src": "5046:8:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "&&",
                      "rightExpression": {
                        "id": 6151,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "UnaryOperation",
                        "operator": "!",
                        "prefix": true,
                        "src": "5058:6:57",
                        "subExpression": {
                          "id": 6150,
                          "name": "found",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6137,
                          "src": "5059:5:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "src": "5045:19:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6156,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 6153,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6145,
                        "src": "5068:1:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "<",
                      "rightExpression": {
                        "expression": {
                          "id": 6154,
                          "name": "_activeBundleIds",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5885,
                          "src": "5072:16:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                            "typeString": "uint256[] storage ref"
                          }
                        },
                        "id": 6155,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "5072:23:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "5068:27:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "5045:50:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6224,
                  "initializationExpression": {
                    "assignments": [
                      6145
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 6145,
                        "mutability": "mutable",
                        "name": "i",
                        "nameLocation": "5038:1:57",
                        "nodeType": "VariableDeclaration",
                        "scope": 6224,
                        "src": "5030:9:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6144,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5030:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "id": 6147,
                    "initialValue": {
                      "hexValue": "30",
                      "id": 6146,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "5042:1:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "5030:13:57"
                  },
                  "loopExpression": {
                    "expression": {
                      "id": 6159,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "5097:3:57",
                      "subExpression": {
                        "id": 6158,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6145,
                        "src": "5097:1:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 6160,
                    "nodeType": "ExpressionStatement",
                    "src": "5097:3:57"
                  },
                  "nodeType": "ForStatement",
                  "src": "5025:630:57"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 6229,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 6226,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "!",
                      "prefix": true,
                      "src": "5669:6:57",
                      "subExpression": {
                        "id": 6225,
                        "name": "found",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6137,
                        "src": "5670:5:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "id": 6228,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "!",
                      "prefix": true,
                      "src": "5679:9:57",
                      "subExpression": {
                        "id": 6227,
                        "name": "inserted",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6141,
                        "src": "5680:8:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "5669:19:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6237,
                  "nodeType": "IfStatement",
                  "src": "5665:81:57",
                  "trueBody": {
                    "id": 6236,
                    "nodeType": "Block",
                    "src": "5690:56:57",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6233,
                              "name": "bundleId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6133,
                              "src": "5726:8:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 6230,
                              "name": "_activeBundleIds",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5885,
                              "src": "5704:16:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                "typeString": "uint256[] storage ref"
                              }
                            },
                            "id": 6232,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "push",
                            "nodeType": "MemberAccess",
                            "src": "5704:21:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_uint256_$dyn_storage_ptr_$_t_uint256_$returns$__$bound_to$_t_array$_t_uint256_$dyn_storage_ptr_$",
                              "typeString": "function (uint256[] storage pointer,uint256)"
                            }
                          },
                          "id": 6234,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5704:31:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6235,
                        "nodeType": "ExpressionStatement",
                        "src": "5704:31:57"
                      }
                    ]
                  }
                }
              ]
            },
            "id": 6239,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_addBundleToActiveList",
            "nameLocation": "4905:22:57",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6134,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6133,
                  "mutability": "mutable",
                  "name": "bundleId",
                  "nameLocation": "4936:8:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6239,
                  "src": "4928:16:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6132,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4928:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4927:18:57"
            },
            "returnParameters": {
              "id": 6135,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4955:0:57"
            },
            "scope": 6413,
            "src": "4896:856:57",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6252,
              "nodeType": "Block",
              "src": "6008:52:57",
              "statements": [
                {
                  "expression": {
                    "id": 6250,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 6248,
                      "name": "firstBundleIsHigherPriority",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6246,
                      "src": "6018:27:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "hexValue": "66616c7365",
                      "id": 6249,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "bool",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "6048:5:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "value": "false"
                    },
                    "src": "6018:35:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6251,
                  "nodeType": "ExpressionStatement",
                  "src": "6018:35:57"
                }
              ]
            },
            "functionSelector": "75fd716f",
            "id": 6253,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isHigherPriorityBundle",
            "nameLocation": "5843:22:57",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6244,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6241,
                  "mutability": "mutable",
                  "name": "firstBundleId",
                  "nameLocation": "5874:13:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6253,
                  "src": "5866:21:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6240,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5866:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6243,
                  "mutability": "mutable",
                  "name": "secondBundleId",
                  "nameLocation": "5897:14:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6253,
                  "src": "5889:22:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6242,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5889:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5865:47:57"
            },
            "returnParameters": {
              "id": 6247,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6246,
                  "mutability": "mutable",
                  "name": "firstBundleIsHigherPriority",
                  "nameLocation": "5974:27:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6253,
                  "src": "5969:32:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6245,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "5969:4:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5968:34:57"
            },
            "scope": 6413,
            "src": "5834:226:57",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "public"
          },
          {
            "body": {
              "id": 6316,
              "nodeType": "Block",
              "src": "6131:403:57",
              "statements": [
                {
                  "assignments": [
                    6259
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6259,
                      "mutability": "mutable",
                      "name": "inList",
                      "nameLocation": "6146:6:57",
                      "nodeType": "VariableDeclaration",
                      "scope": 6316,
                      "src": "6141:11:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 6258,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "6141:4:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6261,
                  "initialValue": {
                    "hexValue": "66616c7365",
                    "id": 6260,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6155:5:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "false"
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6141:19:57"
                },
                {
                  "body": {
                    "id": 6314,
                    "nodeType": "Block",
                    "src": "6235:293:57",
                    "statements": [
                      {
                        "expression": {
                          "id": 6283,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6276,
                            "name": "inList",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6259,
                            "src": "6249:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 6281,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 6277,
                                  "name": "bundleId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6255,
                                  "src": "6259:8:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "baseExpression": {
                                    "id": 6278,
                                    "name": "_activeBundleIds",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5885,
                                    "src": "6271:16:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                      "typeString": "uint256[] storage ref"
                                    }
                                  },
                                  "id": 6280,
                                  "indexExpression": {
                                    "id": 6279,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6263,
                                    "src": "6288:1:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "6271:19:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "6259:31:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              }
                            ],
                            "id": 6282,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "6258:33:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "6249:42:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 6284,
                        "nodeType": "ExpressionStatement",
                        "src": "6249:42:57"
                      },
                      {
                        "condition": {
                          "id": 6285,
                          "name": "inList",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6259,
                          "src": "6309:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 6313,
                        "nodeType": "IfStatement",
                        "src": "6305:213:57",
                        "trueBody": {
                          "id": 6312,
                          "nodeType": "Block",
                          "src": "6317:201:57",
                          "statements": [
                            {
                              "body": {
                                "id": 6305,
                                "nodeType": "Block",
                                "src": "6380:84:57",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 6303,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "baseExpression": {
                                          "id": 6295,
                                          "name": "_activeBundleIds",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 5885,
                                          "src": "6402:16:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                            "typeString": "uint256[] storage ref"
                                          }
                                        },
                                        "id": 6297,
                                        "indexExpression": {
                                          "id": 6296,
                                          "name": "i",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 6263,
                                          "src": "6419:1:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": true,
                                        "nodeType": "IndexAccess",
                                        "src": "6402:19:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "baseExpression": {
                                          "id": 6298,
                                          "name": "_activeBundleIds",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 5885,
                                          "src": "6424:16:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                            "typeString": "uint256[] storage ref"
                                          }
                                        },
                                        "id": 6302,
                                        "indexExpression": {
                                          "commonType": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          "id": 6301,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "leftExpression": {
                                            "id": 6299,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 6263,
                                            "src": "6441:1:57",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "nodeType": "BinaryOperation",
                                          "operator": "+",
                                          "rightExpression": {
                                            "hexValue": "31",
                                            "id": 6300,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "kind": "number",
                                            "lValueRequested": false,
                                            "nodeType": "Literal",
                                            "src": "6443:1:57",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_rational_1_by_1",
                                              "typeString": "int_const 1"
                                            },
                                            "value": "1"
                                          },
                                          "src": "6441:3:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "IndexAccess",
                                        "src": "6424:21:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "6402:43:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 6304,
                                    "nodeType": "ExpressionStatement",
                                    "src": "6402:43:57"
                                  }
                                ]
                              },
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 6291,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 6286,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6263,
                                  "src": "6342:1:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<",
                                "rightExpression": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 6290,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "expression": {
                                      "id": 6287,
                                      "name": "_activeBundleIds",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5885,
                                      "src": "6346:16:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                        "typeString": "uint256[] storage ref"
                                      }
                                    },
                                    "id": 6288,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "length",
                                    "nodeType": "MemberAccess",
                                    "src": "6346:23:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "hexValue": "31",
                                    "id": 6289,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "6372:1:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_1_by_1",
                                      "typeString": "int_const 1"
                                    },
                                    "value": "1"
                                  },
                                  "src": "6346:27:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "6342:31:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 6306,
                              "loopExpression": {
                                "expression": {
                                  "id": 6293,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "UnaryOperation",
                                  "operator": "++",
                                  "prefix": false,
                                  "src": "6375:3:57",
                                  "subExpression": {
                                    "id": 6292,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6263,
                                    "src": "6375:1:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 6294,
                                "nodeType": "ExpressionStatement",
                                "src": "6375:3:57"
                              },
                              "nodeType": "ForStatement",
                              "src": "6335:129:57"
                            },
                            {
                              "expression": {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "id": 6307,
                                    "name": "_activeBundleIds",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5885,
                                    "src": "6481:16:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                                      "typeString": "uint256[] storage ref"
                                    }
                                  },
                                  "id": 6309,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "pop",
                                  "nodeType": "MemberAccess",
                                  "src": "6481:20:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_arraypop_nonpayable$_t_array$_t_uint256_$dyn_storage_ptr_$returns$__$bound_to$_t_array$_t_uint256_$dyn_storage_ptr_$",
                                    "typeString": "function (uint256[] storage pointer)"
                                  }
                                },
                                "id": 6310,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "6481:22:57",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 6311,
                              "nodeType": "ExpressionStatement",
                              "src": "6481:22:57"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 6272,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 6267,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "!",
                      "prefix": true,
                      "src": "6190:7:57",
                      "subExpression": {
                        "id": 6266,
                        "name": "inList",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6259,
                        "src": "6191:6:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6271,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 6268,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6263,
                        "src": "6201:1:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "<",
                      "rightExpression": {
                        "expression": {
                          "id": 6269,
                          "name": "_activeBundleIds",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5885,
                          "src": "6205:16:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                            "typeString": "uint256[] storage ref"
                          }
                        },
                        "id": 6270,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "6205:23:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "6201:27:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "6190:38:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6315,
                  "initializationExpression": {
                    "assignments": [
                      6263
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 6263,
                        "mutability": "mutable",
                        "name": "i",
                        "nameLocation": "6183:1:57",
                        "nodeType": "VariableDeclaration",
                        "scope": 6315,
                        "src": "6175:9:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6262,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6175:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "id": 6265,
                    "initialValue": {
                      "hexValue": "30",
                      "id": 6264,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "6187:1:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "6175:13:57"
                  },
                  "loopExpression": {
                    "expression": {
                      "id": 6274,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "6230:3:57",
                      "subExpression": {
                        "id": 6273,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6263,
                        "src": "6230:1:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 6275,
                    "nodeType": "ExpressionStatement",
                    "src": "6230:3:57"
                  },
                  "nodeType": "ForStatement",
                  "src": "6170:358:57"
                }
              ]
            },
            "id": 6317,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_removeBundleFromActiveList",
            "nameLocation": "6076:27:57",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6256,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6255,
                  "mutability": "mutable",
                  "name": "bundleId",
                  "nameLocation": "6112:8:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6317,
                  "src": "6104:16:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6254,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6104:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6103:18:57"
            },
            "returnParameters": {
              "id": 6257,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6131:0:57"
            },
            "scope": 6413,
            "src": "6067:467:57",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6325,
              "nodeType": "Block",
              "src": "6625:40:57",
              "statements": [
                {
                  "expression": {
                    "id": 6323,
                    "name": "_activeBundleIds",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5885,
                    "src": "6642:16:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint256_$dyn_storage",
                      "typeString": "uint256[] storage ref"
                    }
                  },
                  "functionReturnParameters": 6322,
                  "id": 6324,
                  "nodeType": "Return",
                  "src": "6635:23:57"
                }
              ]
            },
            "functionSelector": "e57d2f1f",
            "id": 6326,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getActiveBundleIds",
            "nameLocation": "6549:18:57",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6318,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6567:2:57"
            },
            "returnParameters": {
              "id": 6322,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6321,
                  "mutability": "mutable",
                  "name": "activeBundleIds",
                  "nameLocation": "6608:15:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6326,
                  "src": "6591:32:57",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                    "typeString": "uint256[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6319,
                      "name": "uint256",
                      "nodeType": "ElementaryTypeName",
                      "src": "6591:7:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 6320,
                    "nodeType": "ArrayTypeName",
                    "src": "6591:9:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                      "typeString": "uint256[]"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6590:34:57"
            },
            "scope": 6413,
            "src": "6540:125:57",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 6337,
              "nodeType": "Block",
              "src": "6761:58:57",
              "statements": [
                {
                  "expression": {
                    "baseExpression": {
                      "id": 6333,
                      "name": "_activePoliciesForBundle",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5889,
                      "src": "6778:24:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
                        "typeString": "mapping(uint256 => uint256)"
                      }
                    },
                    "id": 6335,
                    "indexExpression": {
                      "id": 6334,
                      "name": "bundleId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6328,
                      "src": "6803:8:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "6778:34:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 6332,
                  "id": 6336,
                  "nodeType": "Return",
                  "src": "6771:41:57"
                }
              ]
            },
            "functionSelector": "d5139308",
            "id": 6338,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getActivePolicies",
            "nameLocation": "6680:17:57",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6329,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6328,
                  "mutability": "mutable",
                  "name": "bundleId",
                  "nameLocation": "6706:8:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6338,
                  "src": "6698:16:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6327,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6698:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6697:18:57"
            },
            "returnParameters": {
              "id": 6332,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6331,
                  "mutability": "mutable",
                  "name": "activePolicies",
                  "nameLocation": "6745:14:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6338,
                  "src": "6737:22:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6330,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6737:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6736:24:57"
            },
            "scope": 6413,
            "src": "6671:148:57",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "public"
          },
          {
            "baseFunctions": [
              7292
            ],
            "body": {
              "id": 6360,
              "nodeType": "Block",
              "src": "6914:133:57",
              "statements": [
                {
                  "assignments": [
                    6347
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6347,
                      "mutability": "mutable",
                      "name": "bundleId",
                      "nameLocation": "6932:8:57",
                      "nodeType": "VariableDeclaration",
                      "scope": 6360,
                      "src": "6924:16:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6346,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "6924:7:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6351,
                  "initialValue": {
                    "baseExpression": {
                      "id": 6348,
                      "name": "_collateralizedBy",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5879,
                      "src": "6943:17:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                        "typeString": "mapping(bytes32 => uint256)"
                      }
                    },
                    "id": 6350,
                    "indexExpression": {
                      "id": 6349,
                      "name": "processId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6340,
                      "src": "6961:9:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "6943:28:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6924:47:57"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6355,
                        "name": "bundleId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6347,
                        "src": "7012:8:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 6356,
                        "name": "processId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6340,
                        "src": "7022:9:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "id": 6357,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6342,
                        "src": "7033:6:57",
                        "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": 6352,
                        "name": "_riskpoolService",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6473,
                        "src": "6981:16:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IRiskpoolService_$15040",
                          "typeString": "contract IRiskpoolService"
                        }
                      },
                      "id": 6354,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "processPayout",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 15023,
                      "src": "6981:30:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bytes32_$_t_uint256_$returns$__$",
                        "typeString": "function (uint256,bytes32,uint256) external"
                      }
                    },
                    "id": 6358,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6981:59:57",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6359,
                  "nodeType": "ExpressionStatement",
                  "src": "6981:59:57"
                }
              ]
            },
            "id": 6361,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_processPayout",
            "nameLocation": "6834:14:57",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 6344,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "6901:8:57"
            },
            "parameters": {
              "id": 6343,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6340,
                  "mutability": "mutable",
                  "name": "processId",
                  "nameLocation": "6857:9:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6361,
                  "src": "6849:17:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 6339,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6849:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6342,
                  "mutability": "mutable",
                  "name": "amount",
                  "nameLocation": "6876:6:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6361,
                  "src": "6868:14:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6341,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6868:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6848:35:57"
            },
            "returnParameters": {
              "id": 6345,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6914:0:57"
            },
            "scope": 6413,
            "src": "6825:222:57",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              7285
            ],
            "body": {
              "id": 6383,
              "nodeType": "Block",
              "src": "7143:134:57",
              "statements": [
                {
                  "assignments": [
                    6370
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6370,
                      "mutability": "mutable",
                      "name": "bundleId",
                      "nameLocation": "7161:8:57",
                      "nodeType": "VariableDeclaration",
                      "scope": 6383,
                      "src": "7153:16:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6369,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7153:7:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6374,
                  "initialValue": {
                    "baseExpression": {
                      "id": 6371,
                      "name": "_collateralizedBy",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5879,
                      "src": "7172:17:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                        "typeString": "mapping(bytes32 => uint256)"
                      }
                    },
                    "id": 6373,
                    "indexExpression": {
                      "id": 6372,
                      "name": "processId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6363,
                      "src": "7190:9:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "7172:28:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7153:47:57"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6378,
                        "name": "bundleId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6370,
                        "src": "7242:8:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 6379,
                        "name": "processId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6363,
                        "src": "7252:9:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "id": 6380,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6365,
                        "src": "7263:6:57",
                        "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": 6375,
                        "name": "_riskpoolService",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6473,
                        "src": "7210:16:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IRiskpoolService_$15040",
                          "typeString": "contract IRiskpoolService"
                        }
                      },
                      "id": 6377,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "processPremium",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 15014,
                      "src": "7210:31:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bytes32_$_t_uint256_$returns$__$",
                        "typeString": "function (uint256,bytes32,uint256) external"
                      }
                    },
                    "id": 6381,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7210:60:57",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6382,
                  "nodeType": "ExpressionStatement",
                  "src": "7210:60:57"
                }
              ]
            },
            "id": 6384,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_processPremium",
            "nameLocation": "7062:15:57",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 6367,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "7130:8:57"
            },
            "parameters": {
              "id": 6366,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6363,
                  "mutability": "mutable",
                  "name": "processId",
                  "nameLocation": "7086:9:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6384,
                  "src": "7078:17:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 6362,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "7078:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6365,
                  "mutability": "mutable",
                  "name": "amount",
                  "nameLocation": "7105:6:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6384,
                  "src": "7097:14:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6364,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7097:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7077:35:57"
            },
            "returnParameters": {
              "id": 6368,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7143:0:57"
            },
            "scope": 6413,
            "src": "7053:224:57",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              7299
            ],
            "body": {
              "id": 6411,
              "nodeType": "Block",
              "src": "7404:241:57",
              "statements": [
                {
                  "assignments": [
                    6393
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6393,
                      "mutability": "mutable",
                      "name": "bundleId",
                      "nameLocation": "7430:8:57",
                      "nodeType": "VariableDeclaration",
                      "scope": 6411,
                      "src": "7422:16:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6392,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7422:7:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6397,
                  "initialValue": {
                    "baseExpression": {
                      "id": 6394,
                      "name": "_collateralizedBy",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5879,
                      "src": "7441:17:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                        "typeString": "mapping(bytes32 => uint256)"
                      }
                    },
                    "id": 6396,
                    "indexExpression": {
                      "id": 6395,
                      "name": "processId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6386,
                      "src": "7459:9:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "7441:28:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7422:47:57"
                },
                {
                  "expression": {
                    "id": 6404,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 6398,
                      "name": "collateralAmount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6390,
                      "src": "7479:16:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "arguments": [
                        {
                          "id": 6401,
                          "name": "bundleId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6393,
                          "src": "7529:8:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 6402,
                          "name": "processId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6386,
                          "src": "7539:9:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        ],
                        "expression": {
                          "id": 6399,
                          "name": "_riskpoolService",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6473,
                          "src": "7498:16:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IRiskpoolService_$15040",
                            "typeString": "contract IRiskpoolService"
                          }
                        },
                        "id": 6400,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "releasePolicy",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 15032,
                        "src": "7498:30:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bytes32_$returns$_t_uint256_$",
                          "typeString": "function (uint256,bytes32) external returns (uint256)"
                        }
                      },
                      "id": 6403,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "7498:51:57",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7479:70:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 6405,
                  "nodeType": "ExpressionStatement",
                  "src": "7479:70:57"
                },
                {
                  "expression": {
                    "id": 6409,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "--",
                    "prefix": false,
                    "src": "7602:36:57",
                    "subExpression": {
                      "baseExpression": {
                        "id": 6406,
                        "name": "_activePoliciesForBundle",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5889,
                        "src": "7602:24:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
                          "typeString": "mapping(uint256 => uint256)"
                        }
                      },
                      "id": 6408,
                      "indexExpression": {
                        "id": 6407,
                        "name": "bundleId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6393,
                        "src": "7627:8:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "7602:34:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 6410,
                  "nodeType": "ExpressionStatement",
                  "src": "7602:36:57"
                }
              ]
            },
            "id": 6412,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_releaseCollateral",
            "nameLocation": "7292:18:57",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 6388,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "7348:8:57"
            },
            "parameters": {
              "id": 6387,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6386,
                  "mutability": "mutable",
                  "name": "processId",
                  "nameLocation": "7319:9:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6412,
                  "src": "7311:17:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 6385,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "7311:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7310:19:57"
            },
            "returnParameters": {
              "id": 6391,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6390,
                  "mutability": "mutable",
                  "name": "collateralAmount",
                  "nameLocation": "7381:16:57",
                  "nodeType": "VariableDeclaration",
                  "scope": 6412,
                  "src": "7373:24:57",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6389,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7373:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7372:26:57"
            },
            "scope": 6413,
            "src": "7283:362:57",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 6414,
        "src": "299:7348:57"
      }
    ],
    "src": "39:7609:57"
  },
  "bytecode": "",
  "bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
  "compiler": {
    "evm_version": "istanbul",
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "version": "0.8.2+commit.661d1103"
  },
  "contractName": "BasicRiskpool2",
  "coverageMap": {
    "branches": {},
    "statements": {}
  },
  "dependencies": [
    "etherisc/gif-interface@3b0002a/Component",
    "OpenZeppelin/openzeppelin-contracts@4.7.3/Context",
    "etherisc/gif-interface@3b0002a/IAccess",
    "etherisc/gif-interface@3b0002a/IBundleToken",
    "etherisc/gif-interface@3b0002a/IComponent",
    "etherisc/gif-interface@3b0002a/IComponentEvents",
    "etherisc/gif-interface@3b0002a/IComponentOwnerService",
    "OpenZeppelin/openzeppelin-contracts@4.7.3/IERC165",
    "OpenZeppelin/openzeppelin-contracts@4.7.3/IERC20",
    "OpenZeppelin/openzeppelin-contracts@4.7.3/IERC721",
    "etherisc/gif-interface@3b0002a/IInstanceOperatorService",
    "etherisc/gif-interface@3b0002a/IInstanceService",
    "etherisc/gif-interface@3b0002a/IOracleService",
    "etherisc/gif-interface@3b0002a/IProductService",
    "etherisc/gif-interface@3b0002a/IRegistry",
    "etherisc/gif-interface@3b0002a/IRiskpool",
    "etherisc/gif-interface@3b0002a/IRiskpoolService",
    "OpenZeppelin/openzeppelin-contracts@4.7.3/Ownable",
    "Riskpool2"
  ],
  "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": [
    299,
    7647
  ],
  "opcodes": "",
  "pcMap": {},
  "sha1": "0cb4539b3debfe0a19433503896bea1ab008705d",
  "source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.2;\n\nimport \"./Riskpool2.sol\";\nimport \"@etherisc/gif-interface/contracts/modules/IBundle.sol\";\nimport \"@etherisc/gif-interface/contracts/modules/IPolicy.sol\";\n\n// basic riskpool always collateralizes one application using exactly one bundle\nabstract contract BasicRiskpool2 is Riskpool2 {\n\n    event LogBasicRiskpoolCapitalCheck(uint256 activeBundles, uint256 policies);\n    event LogBasicRiskpoolCapitalization(uint256 activeBundles, uint256 capital, uint256 lockedCapital, uint256 collateralAmount, bool capacityIsAvailable);\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    // will hold a sorted active bundle id array\n    uint256[] private _activeBundleIds;\n\n    // informational counter of active policies per bundle\n    mapping(uint256 /* bundleId */ => uint256 /* activePolicyCount */) private _activePoliciesForBundle;\n\n    constructor(\n        bytes32 name,\n        uint256 collateralization,\n        uint256 sumOfSumInsuredCap,\n        address erc20Token,\n        address wallet,\n        address registry\n    )\n        Riskpool2(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        require(_activeBundleIds.length > 0, \"ERROR:BRP-001:NO_ACTIVE_BUNDLES\");\n\n        uint256 capital = getCapital();\n        uint256 lockedCapital = getTotalValueLocked();\n        bool capacityIsAvailable = capital > lockedCapital + collateralAmount;\n\n        emit LogBasicRiskpoolCapitalization(\n            _activeBundleIds.length,\n            capital,\n            lockedCapital, \n            collateralAmount,\n            capacityIsAvailable);\n\n        // ensure there is a chance to find the collateral\n        if(!capacityIsAvailable) {\n            return false;\n        }\n\n        // set default outcome\n        success = false;\n\n        IPolicy.Application memory application = _instanceService.getApplication(processId);\n        \n        // basic riskpool implementation: policy coverage by single bundle only/\n        // active bundle arrays with the most attractive bundle at the first place\n        for (uint256 i = 0; i < _activeBundleIds.length && !success; i++) {\n            uint256 bundleId = _activeBundleIds[i];\n            // uint256 bundleId = getActiveBundleId(bundleIdx);\n            IBundle.Bundle memory bundle = _instanceService.getBundle(bundleId);\n            bool isMatching = bundleMatchesApplication2(bundle, application);\n            emit LogRiskpoolBundleMatchesPolicy(bundleId, isMatching);\n\n            if (isMatching) {\n                uint256 maxAmount = bundle.capital - bundle.lockedCapital;\n                emit LogBasicRiskpoolCandidateBundleAmountCheck(i, bundleId, maxAmount, collateralAmount);\n\n                if (maxAmount >= collateralAmount) {\n                    _riskpoolService.collateralizePolicy(bundleId, processId, collateralAmount);\n                    _collateralizedBy[processId] = bundleId;\n                    success = true;\n                    _policiesCounter++;\n\n                    // update active policies counter\n                    _activePoliciesForBundle[bundleId]++;\n                }\n            }\n        }\n    }\n\n    // hack\n    function bundleMatchesApplication2(\n        IBundle.Bundle memory bundle, \n        IPolicy.Application memory application\n    ) \n        public virtual returns(bool isMatching);\n\n    // manage sorted list of active bundle ids\n    function _afterCreateBundle(uint256 bundleId, bytes memory filter, uint256 initialAmount) internal override virtual {\n        _addBundleToActiveList(bundleId);\n    }\n\n    function _afterLockBundle(uint256 bundleId) internal override virtual {\n        _removeBundleFromActiveList(bundleId);\n    }\n    function _afterUnlockBundle(uint256 bundleId) internal override virtual {\n        _addBundleToActiveList(bundleId);\n    }\n    function _afterCloseBundle(uint256 bundleId) internal override virtual {\n        _removeBundleFromActiveList(bundleId);\n    }\n\n    function _addBundleToActiveList(uint256 bundleId) internal {\n        bool found = false;\n        bool inserted = false;\n\n        for (uint256 i = 0; !inserted && !found && i < _activeBundleIds.length; i++) {\n            if (bundleId == _activeBundleIds[i]) {\n                found = true;\n            } \n            else if (isHigherPriorityBundle(bundleId, _activeBundleIds[i])) {\n                inserted = true;\n                _activeBundleIds.push(10**6);\n\n                for (uint256 j = _activeBundleIds.length - 1; j > i; j--) {\n                    _activeBundleIds[j] = _activeBundleIds[j-1];\n                }\n\n                // does not work for inserting at end of list ...\n                _activeBundleIds[i] = bundleId;\n            }\n        }\n\n        if (!found && !inserted) {\n            _activeBundleIds.push(bundleId);\n        }\n    }\n\n    // default implementation adds new bundle at the end of the active list\n    function isHigherPriorityBundle(uint256 firstBundleId, uint256 secondBundleId) \n        public virtual \n        view \n        returns (bool firstBundleIsHigherPriority) \n    {\n        firstBundleIsHigherPriority = false;\n    }\n\n\n    function _removeBundleFromActiveList(uint256 bundleId) internal {\n        bool inList = false;\n        for (uint256 i = 0; !inList && i < _activeBundleIds.length; i++) {\n            inList = (bundleId == _activeBundleIds[i]);\n            if (inList) {\n                for (; i < _activeBundleIds.length - 1; i++) {\n                    _activeBundleIds[i] = _activeBundleIds[i+1];\n                }\n                _activeBundleIds.pop();\n            }\n        }\n    }\n\n    function getActiveBundleIds() public view returns (uint256[] memory activeBundleIds) {\n        return _activeBundleIds;\n    }\n\n    function getActivePolicies(uint256 bundleId) public view returns (uint256 activePolicies) {\n        return _activePoliciesForBundle[bundleId];\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        // update active policies counter\n        _activePoliciesForBundle[bundleId]--;\n    }\n}\n",
  "sourceMap": "",
  "sourcePath": "contracts/gif/BasicRiskpool2.sol",
  "type": "contract"
}