{
  "contractName": "TokenCapGC",
  "abi": [
    {
      "constant": true,
      "inputs": [
        {
          "name": "",
          "type": "address"
        },
        {
          "name": "_paramsHash",
          "type": "bytes32"
        },
        {
          "name": "",
          "type": "bytes"
        }
      ],
      "name": "post",
      "outputs": [
        {
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "name": "_token",
          "type": "address"
        },
        {
          "name": "_cap",
          "type": "uint256"
        }
      ],
      "name": "getParametersHash",
      "outputs": [
        {
          "name": "",
          "type": "bytes32"
        }
      ],
      "payable": false,
      "stateMutability": "pure",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "name": "",
          "type": "address"
        },
        {
          "name": "",
          "type": "bytes32"
        },
        {
          "name": "",
          "type": "bytes"
        }
      ],
      "name": "pre",
      "outputs": [
        {
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "pure",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "_token",
          "type": "address"
        },
        {
          "name": "_cap",
          "type": "uint256"
        }
      ],
      "name": "setParameters",
      "outputs": [
        {
          "name": "",
          "type": "bytes32"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "name": "",
          "type": "bytes32"
        }
      ],
      "name": "params",
      "outputs": [
        {
          "name": "token",
          "type": "address"
        },
        {
          "name": "cap",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "bytecode": "0x6060604052341561000f57600080fd5b6103958061001e6000396000f30060606040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab9b33a811461007157806378fc063c146100ea57806389eaee6a1461011e578063c419816114610183578063dc6ab527146101a5575b600080fd5b341561007c57600080fd5b6100d660048035600160a060020a03169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506101dd95505050505050565b604051901515815260200160405180910390f35b34156100f557600080fd5b61010c600160a060020a03600435166024356102aa565b60405190815260200160405180910390f35b341561012957600080fd5b6100d660048035600160a060020a03169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506102e695505050505050565b341561018e57600080fd5b61010c600160a060020a03600435166024356102ef565b34156101b057600080fd5b6101bb600435610344565b604051600160a060020a03909216825260208201526040908101905180910390f35b600082815260208190526040812054600160a060020a0316158015906102925750600083815260208190526040808220600181015490549092600160a060020a03909116916318160ddd919051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561027557600080fd5b6102c65a03f1151561028657600080fd5b50505060405180519050115b1561029f575060006102a3565b5060015b9392505050565b60008282604051600160a060020a03929092166c0100000000000000000000000002825260148201526034016040518091039020905092915050565b60019392505050565b6000806102fc84846102aa565b60008181526020819052604090208054600160a060020a03871673ffffffffffffffffffffffffffffffffffffffff1990911617815560010184905591508190505092915050565b60006020819052908152604090208054600190910154600160a060020a0390911690825600a165627a7a72305820843209dc2edbf8969c5b87f25f5e95da893e7e5acf7df59e26dc7050a584bc5f0029",
  "deployedBytecode": "0x60606040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab9b33a811461007157806378fc063c146100ea57806389eaee6a1461011e578063c419816114610183578063dc6ab527146101a5575b600080fd5b341561007c57600080fd5b6100d660048035600160a060020a03169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506101dd95505050505050565b604051901515815260200160405180910390f35b34156100f557600080fd5b61010c600160a060020a03600435166024356102aa565b60405190815260200160405180910390f35b341561012957600080fd5b6100d660048035600160a060020a03169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506102e695505050505050565b341561018e57600080fd5b61010c600160a060020a03600435166024356102ef565b34156101b057600080fd5b6101bb600435610344565b604051600160a060020a03909216825260208201526040908101905180910390f35b600082815260208190526040812054600160a060020a0316158015906102925750600083815260208190526040808220600181015490549092600160a060020a03909116916318160ddd919051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561027557600080fd5b6102c65a03f1151561028657600080fd5b50505060405180519050115b1561029f575060006102a3565b5060015b9392505050565b60008282604051600160a060020a03929092166c0100000000000000000000000002825260148201526034016040518091039020905092915050565b60019392505050565b6000806102fc84846102aa565b60008181526020819052604090208054600160a060020a03871673ffffffffffffffffffffffffffffffffffffffff1990911617815560010184905591508190505092915050565b60006020819052908152604090208054600190910154600160a060020a0390911690825600a165627a7a72305820843209dc2edbf8969c5b87f25f5e95da893e7e5acf7df59e26dc7050a584bc5f0029",
  "sourceMap": "201:1933:13:-;;;;;;;;;;;;;;;;;",
  "deployedSourceMap": "201:1933:13:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1842:290;;;;;;;;;;;;;-1:-1:-1;;;;;1842:290:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1842:290:13;;-1:-1:-1;1842:290:13;;-1:-1:-1;;;;;;1842:290:13;;;;;;;;;;;;;;;;;;1225:138;;;;;;;;;;-1:-1:-1;;;;;1225:138:13;;;;;;;;;;;;;;;;;;;;;;1555:92;;;;;;;;;;;;;-1:-1:-1;;;;;1555:92:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1555:92:13;;-1:-1:-1;1555:92:13;;-1:-1:-1;;;;;;1555:92:13;716:258;;;;;;;;;;-1:-1:-1;;;;;716:258:13;;;;;;;444:43;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;444:43:13;;;;;;;;;;;;;;;;;;;;1842:290;1913:4;1934:19;;;;;;;;;;:25;-1:-1:-1;;;;;1934:25:13;:45;;;;1933:131;;-1:-1:-1;2040:6:13;:19;;;;;;;;;;;:23;;;;1998:25;;2040:23;;-1:-1:-1;;;;;1998:25:13;;;;:37;;2040:6;1998:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:65;1933:131;1929:176;;;-1:-1:-1;2087:5:13;2080:12;;1929:176;-1:-1:-1;2121:4:13;1842:290;;;;;;:::o;1225:138::-;1305:7;1342:6;1350:4;1332:23;;-1:-1:-1;;;;;1332:23:13;;;;;;;;;;;;;;;;;;;;;1324:32;;1225:138;;;;:::o;1555:92::-;1636:4;1555:92;;;;;:::o;716:258::-;787:7;806:18;827:31;845:6;853:4;827:17;:31::i;:::-;868:6;:18;;;;;;;;;;:33;;-1:-1:-1;;;;;868:33:13;;-1:-1:-1;;868:33:13;;;;;;;911:22;:29;;;806:52;-1:-1:-1;806:52:13;;-1:-1:-1;716:258:13;;;;;:::o;444:43::-;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;444:43:13;;;;;:::o",
  "source": "pragma solidity ^0.4.18;\n\nimport \"zeppelin-solidity/contracts/token/StandardToken.sol\";\n\n\n/**\n * @title Token Cap Global Constraint\n * @dev A simple global constraint to cap the number of tokens.\n */\n\ncontract TokenCapGC {\n    // A set of parameters, on which the cap will be checked:\n    struct Parameters {\n        StandardToken token;\n        uint cap;\n    }\n\n    // Mapping from the hash of the parameters to the parameters themselves:\n    mapping (bytes32=>Parameters) public params;\n\n\n    /**\n     * @dev adding a new set of parameters\n     * @param  _token the token to add to the params.\n     * @param _cap the cap to check the total supply against.\n     * @return the calculated parameters hash\n     */\n    function setParameters(StandardToken _token, uint _cap) public returns(bytes32) {\n        bytes32 paramsHash = getParametersHash(_token, _cap);\n        params[paramsHash].token = _token;\n        params[paramsHash].cap = _cap;\n        return paramsHash;\n    }\n\n    /**\n     * @dev calculate and returns the hash of the given parameters\n     * @param  _token the token to add to the params.\n     * @param _cap the cap to check the total supply against.\n     * @return the calculated parameters hash\n     */\n    function getParametersHash(StandardToken _token, uint _cap) public pure returns(bytes32) {\n        return (keccak256(_token, _cap));\n    }\n\n    /**\n     * @dev check the constraint after the action.\n     * This global constraint only checks the state after the action, so here we just return true:\n     * @return true\n     */\n    function pre(address, bytes32, bytes) public pure returns(bool) {\n        return true;\n    }\n\n    /**\n     * @dev check the total supply cap.\n     * @param  _paramsHash the parameters hash to check the total supply cap against.\n     * @return bool which represents a success\n     */\n    function post(address, bytes32 _paramsHash, bytes) public view returns(bool) {\n        if ((params[_paramsHash].token != StandardToken(0)) &&\n            ( params[_paramsHash].token.totalSupply() > params[_paramsHash].cap)) {\n            return false;\n          }\n        return true;\n    }\n}\n",
  "sourcePath": "/Users/oren/daostack/daostack2/daostack/contracts/globalConstraints/TokenCapGC.sol",
  "ast": {
    "attributes": {
      "absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/globalConstraints/TokenCapGC.sol",
      "exportedSymbols": {
        "TokenCapGC": [
          6814
        ]
      }
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "^",
            "0.4",
            ".18"
          ]
        },
        "id": 6700,
        "name": "PragmaDirective",
        "src": "0:24:13"
      },
      {
        "attributes": {
          "SourceUnit": 12000,
          "absolutePath": "zeppelin-solidity/contracts/token/StandardToken.sol",
          "file": "zeppelin-solidity/contracts/token/StandardToken.sol",
          "scope": 6815,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 6701,
        "name": "ImportDirective",
        "src": "26:61:13"
      },
      {
        "attributes": {
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "contract",
          "documentation": "@title Token Cap Global Constraint\n@dev A simple global constraint to cap the number of tokens.",
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            6814
          ],
          "name": "TokenCapGC",
          "scope": 6815
        },
        "children": [
          {
            "attributes": {
              "canonicalName": "TokenCapGC.Parameters",
              "name": "Parameters",
              "scope": 6814,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "constant": false,
                  "name": "token",
                  "scope": 6706,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "contract StandardToken",
                  "value": null,
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "contractScope": null,
                      "name": "StandardToken",
                      "referencedDeclaration": 11999,
                      "type": "contract StandardToken"
                    },
                    "id": 6702,
                    "name": "UserDefinedTypeName",
                    "src": "317:13:13"
                  }
                ],
                "id": 6703,
                "name": "VariableDeclaration",
                "src": "317:19:13"
              },
              {
                "attributes": {
                  "constant": false,
                  "name": "cap",
                  "scope": 6706,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "uint256",
                  "value": null,
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "name": "uint",
                      "type": "uint256"
                    },
                    "id": 6704,
                    "name": "ElementaryTypeName",
                    "src": "346:4:13"
                  }
                ],
                "id": 6705,
                "name": "VariableDeclaration",
                "src": "346:8:13"
              }
            ],
            "id": 6706,
            "name": "StructDefinition",
            "src": "289:72:13"
          },
          {
            "attributes": {
              "constant": false,
              "name": "params",
              "scope": 6814,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "mapping(bytes32 => struct TokenCapGC.Parameters storage ref)",
              "value": null,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "type": "mapping(bytes32 => struct TokenCapGC.Parameters storage ref)"
                },
                "children": [
                  {
                    "attributes": {
                      "name": "bytes32",
                      "type": "bytes32"
                    },
                    "id": 6707,
                    "name": "ElementaryTypeName",
                    "src": "453:7:13"
                  },
                  {
                    "attributes": {
                      "contractScope": null,
                      "name": "Parameters",
                      "referencedDeclaration": 6706,
                      "type": "struct TokenCapGC.Parameters storage pointer"
                    },
                    "id": 6708,
                    "name": "UserDefinedTypeName",
                    "src": "462:10:13"
                  }
                ],
                "id": 6709,
                "name": "Mapping",
                "src": "444:29:13"
              }
            ],
            "id": 6710,
            "name": "VariableDeclaration",
            "src": "444:43:13"
          },
          {
            "attributes": {
              "constant": false,
              "implemented": true,
              "isConstructor": false,
              "modifiers": [
                null
              ],
              "name": "setParameters",
              "payable": false,
              "scope": 6814,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_token",
                      "scope": 6743,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "contract StandardToken",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "StandardToken",
                          "referencedDeclaration": 11999,
                          "type": "contract StandardToken"
                        },
                        "id": 6711,
                        "name": "UserDefinedTypeName",
                        "src": "739:13:13"
                      }
                    ],
                    "id": 6712,
                    "name": "VariableDeclaration",
                    "src": "739:20:13"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_cap",
                      "scope": 6743,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 6713,
                        "name": "ElementaryTypeName",
                        "src": "761:4:13"
                      }
                    ],
                    "id": 6714,
                    "name": "VariableDeclaration",
                    "src": "761:9:13"
                  }
                ],
                "id": 6715,
                "name": "ParameterList",
                "src": "738:33:13"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 6743,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 6716,
                        "name": "ElementaryTypeName",
                        "src": "787:7:13"
                      }
                    ],
                    "id": 6717,
                    "name": "VariableDeclaration",
                    "src": "787:7:13"
                  }
                ],
                "id": 6718,
                "name": "ParameterList",
                "src": "786:9:13"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        6720
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "paramsHash",
                          "scope": 6743,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 6719,
                            "name": "ElementaryTypeName",
                            "src": "806:7:13"
                          }
                        ],
                        "id": 6720,
                        "name": "VariableDeclaration",
                        "src": "806:18:13"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bytes32",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_StandardToken_$11999",
                                  "typeString": "contract StandardToken"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6759,
                              "type": "function (contract StandardToken,uint256) pure returns (bytes32)",
                              "value": "getParametersHash"
                            },
                            "id": 6721,
                            "name": "Identifier",
                            "src": "827:17:13"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6712,
                              "type": "contract StandardToken",
                              "value": "_token"
                            },
                            "id": 6722,
                            "name": "Identifier",
                            "src": "845:6:13"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6714,
                              "type": "uint256",
                              "value": "_cap"
                            },
                            "id": 6723,
                            "name": "Identifier",
                            "src": "853:4:13"
                          }
                        ],
                        "id": 6724,
                        "name": "FunctionCall",
                        "src": "827:31:13"
                      }
                    ],
                    "id": 6725,
                    "name": "VariableDeclarationStatement",
                    "src": "806:52:13"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "contract StandardToken"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "member_name": "token",
                              "referencedDeclaration": 6703,
                              "type": "contract StandardToken"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "type": "struct TokenCapGC.Parameters storage ref"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6710,
                                      "type": "mapping(bytes32 => struct TokenCapGC.Parameters storage ref)",
                                      "value": "params"
                                    },
                                    "id": 6726,
                                    "name": "Identifier",
                                    "src": "868:6:13"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6720,
                                      "type": "bytes32",
                                      "value": "paramsHash"
                                    },
                                    "id": 6727,
                                    "name": "Identifier",
                                    "src": "875:10:13"
                                  }
                                ],
                                "id": 6728,
                                "name": "IndexAccess",
                                "src": "868:18:13"
                              }
                            ],
                            "id": 6729,
                            "name": "MemberAccess",
                            "src": "868:24:13"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6712,
                              "type": "contract StandardToken",
                              "value": "_token"
                            },
                            "id": 6730,
                            "name": "Identifier",
                            "src": "895:6:13"
                          }
                        ],
                        "id": 6731,
                        "name": "Assignment",
                        "src": "868:33:13"
                      }
                    ],
                    "id": 6732,
                    "name": "ExpressionStatement",
                    "src": "868:33:13"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "member_name": "cap",
                              "referencedDeclaration": 6705,
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "type": "struct TokenCapGC.Parameters storage ref"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6710,
                                      "type": "mapping(bytes32 => struct TokenCapGC.Parameters storage ref)",
                                      "value": "params"
                                    },
                                    "id": 6733,
                                    "name": "Identifier",
                                    "src": "911:6:13"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6720,
                                      "type": "bytes32",
                                      "value": "paramsHash"
                                    },
                                    "id": 6734,
                                    "name": "Identifier",
                                    "src": "918:10:13"
                                  }
                                ],
                                "id": 6735,
                                "name": "IndexAccess",
                                "src": "911:18:13"
                              }
                            ],
                            "id": 6736,
                            "name": "MemberAccess",
                            "src": "911:22:13"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6714,
                              "type": "uint256",
                              "value": "_cap"
                            },
                            "id": 6737,
                            "name": "Identifier",
                            "src": "936:4:13"
                          }
                        ],
                        "id": 6738,
                        "name": "Assignment",
                        "src": "911:29:13"
                      }
                    ],
                    "id": 6739,
                    "name": "ExpressionStatement",
                    "src": "911:29:13"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 6718
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 6720,
                          "type": "bytes32",
                          "value": "paramsHash"
                        },
                        "id": 6740,
                        "name": "Identifier",
                        "src": "957:10:13"
                      }
                    ],
                    "id": 6741,
                    "name": "Return",
                    "src": "950:17:13"
                  }
                ],
                "id": 6742,
                "name": "Block",
                "src": "796:178:13"
              }
            ],
            "id": 6743,
            "name": "FunctionDefinition",
            "src": "716:258:13"
          },
          {
            "attributes": {
              "constant": true,
              "implemented": true,
              "isConstructor": false,
              "modifiers": [
                null
              ],
              "name": "getParametersHash",
              "payable": false,
              "scope": 6814,
              "stateMutability": "pure",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_token",
                      "scope": 6759,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "contract StandardToken",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "StandardToken",
                          "referencedDeclaration": 11999,
                          "type": "contract StandardToken"
                        },
                        "id": 6744,
                        "name": "UserDefinedTypeName",
                        "src": "1252:13:13"
                      }
                    ],
                    "id": 6745,
                    "name": "VariableDeclaration",
                    "src": "1252:20:13"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_cap",
                      "scope": 6759,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 6746,
                        "name": "ElementaryTypeName",
                        "src": "1274:4:13"
                      }
                    ],
                    "id": 6747,
                    "name": "VariableDeclaration",
                    "src": "1274:9:13"
                  }
                ],
                "id": 6748,
                "name": "ParameterList",
                "src": "1251:33:13"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 6759,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 6749,
                        "name": "ElementaryTypeName",
                        "src": "1305:7:13"
                      }
                    ],
                    "id": 6750,
                    "name": "VariableDeclaration",
                    "src": "1305:7:13"
                  }
                ],
                "id": 6751,
                "name": "ParameterList",
                "src": "1304:9:13"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 6751
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "type": "bytes32"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "bytes32",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_StandardToken_$11999",
                                      "typeString": "contract StandardToken"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 12005,
                                  "type": "function () pure returns (bytes32)",
                                  "value": "keccak256"
                                },
                                "id": 6752,
                                "name": "Identifier",
                                "src": "1332:9:13"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6745,
                                  "type": "contract StandardToken",
                                  "value": "_token"
                                },
                                "id": 6753,
                                "name": "Identifier",
                                "src": "1342:6:13"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6747,
                                  "type": "uint256",
                                  "value": "_cap"
                                },
                                "id": 6754,
                                "name": "Identifier",
                                "src": "1350:4:13"
                              }
                            ],
                            "id": 6755,
                            "name": "FunctionCall",
                            "src": "1332:23:13"
                          }
                        ],
                        "id": 6756,
                        "name": "TupleExpression",
                        "src": "1331:25:13"
                      }
                    ],
                    "id": 6757,
                    "name": "Return",
                    "src": "1324:32:13"
                  }
                ],
                "id": 6758,
                "name": "Block",
                "src": "1314:49:13"
              }
            ],
            "id": 6759,
            "name": "FunctionDefinition",
            "src": "1225:138:13"
          },
          {
            "attributes": {
              "constant": true,
              "implemented": true,
              "isConstructor": false,
              "modifiers": [
                null
              ],
              "name": "pre",
              "payable": false,
              "scope": 6814,
              "stateMutability": "pure",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 6773,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "type": "address"
                        },
                        "id": 6760,
                        "name": "ElementaryTypeName",
                        "src": "1568:7:13"
                      }
                    ],
                    "id": 6761,
                    "name": "VariableDeclaration",
                    "src": "1568:7:13"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 6773,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 6762,
                        "name": "ElementaryTypeName",
                        "src": "1577:7:13"
                      }
                    ],
                    "id": 6763,
                    "name": "VariableDeclaration",
                    "src": "1577:7:13"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 6773,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes memory",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes storage pointer"
                        },
                        "id": 6764,
                        "name": "ElementaryTypeName",
                        "src": "1586:5:13"
                      }
                    ],
                    "id": 6765,
                    "name": "VariableDeclaration",
                    "src": "1586:5:13"
                  }
                ],
                "id": 6766,
                "name": "ParameterList",
                "src": "1567:25:13"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 6773,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 6767,
                        "name": "ElementaryTypeName",
                        "src": "1613:4:13"
                      }
                    ],
                    "id": 6768,
                    "name": "VariableDeclaration",
                    "src": "1613:4:13"
                  }
                ],
                "id": 6769,
                "name": "ParameterList",
                "src": "1612:6:13"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 6769
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "hexvalue": "74727565",
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "subdenomination": null,
                          "token": "bool",
                          "type": "bool",
                          "value": "true"
                        },
                        "id": 6770,
                        "name": "Literal",
                        "src": "1636:4:13"
                      }
                    ],
                    "id": 6771,
                    "name": "Return",
                    "src": "1629:11:13"
                  }
                ],
                "id": 6772,
                "name": "Block",
                "src": "1619:28:13"
              }
            ],
            "id": 6773,
            "name": "FunctionDefinition",
            "src": "1555:92:13"
          },
          {
            "attributes": {
              "constant": true,
              "implemented": true,
              "isConstructor": false,
              "modifiers": [
                null
              ],
              "name": "post",
              "payable": false,
              "scope": 6814,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 6813,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "type": "address"
                        },
                        "id": 6774,
                        "name": "ElementaryTypeName",
                        "src": "1856:7:13"
                      }
                    ],
                    "id": 6775,
                    "name": "VariableDeclaration",
                    "src": "1856:7:13"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_paramsHash",
                      "scope": 6813,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 6776,
                        "name": "ElementaryTypeName",
                        "src": "1865:7:13"
                      }
                    ],
                    "id": 6777,
                    "name": "VariableDeclaration",
                    "src": "1865:19:13"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 6813,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes memory",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes storage pointer"
                        },
                        "id": 6778,
                        "name": "ElementaryTypeName",
                        "src": "1886:5:13"
                      }
                    ],
                    "id": 6779,
                    "name": "VariableDeclaration",
                    "src": "1886:5:13"
                  }
                ],
                "id": 6780,
                "name": "ParameterList",
                "src": "1855:37:13"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 6813,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 6781,
                        "name": "ElementaryTypeName",
                        "src": "1913:4:13"
                      }
                    ],
                    "id": 6782,
                    "name": "VariableDeclaration",
                    "src": "1913:4:13"
                  }
                ],
                "id": 6783,
                "name": "ParameterList",
                "src": "1912:6:13"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "&&",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_contract$_StandardToken_$11999",
                                    "typeString": "contract StandardToken"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "!=",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "token",
                                      "referencedDeclaration": 6703,
                                      "type": "contract StandardToken"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "type": "struct TokenCapGC.Parameters storage ref"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 6710,
                                              "type": "mapping(bytes32 => struct TokenCapGC.Parameters storage ref)",
                                              "value": "params"
                                            },
                                            "id": 6784,
                                            "name": "Identifier",
                                            "src": "1934:6:13"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 6777,
                                              "type": "bytes32",
                                              "value": "_paramsHash"
                                            },
                                            "id": 6785,
                                            "name": "Identifier",
                                            "src": "1941:11:13"
                                          }
                                        ],
                                        "id": 6786,
                                        "name": "IndexAccess",
                                        "src": "1934:19:13"
                                      }
                                    ],
                                    "id": 6787,
                                    "name": "MemberAccess",
                                    "src": "1934:25:13"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "contract StandardToken",
                                      "type_conversion": true
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_rational_0_by_1",
                                              "typeString": "int_const 0"
                                            }
                                          ],
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 11999,
                                          "type": "type(contract StandardToken)",
                                          "value": "StandardToken"
                                        },
                                        "id": 6788,
                                        "name": "Identifier",
                                        "src": "1963:13:13"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "hexvalue": "30",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "subdenomination": null,
                                          "token": "number",
                                          "type": "int_const 0",
                                          "value": "0"
                                        },
                                        "id": 6789,
                                        "name": "Literal",
                                        "src": "1977:1:13"
                                      }
                                    ],
                                    "id": 6790,
                                    "name": "FunctionCall",
                                    "src": "1963:16:13"
                                  }
                                ],
                                "id": 6791,
                                "name": "BinaryOperation",
                                "src": "1934:45:13"
                              }
                            ],
                            "id": 6792,
                            "name": "TupleExpression",
                            "src": "1933:47:13"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": ">",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "uint256",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "totalSupply",
                                          "referencedDeclaration": 11633,
                                          "type": "function () view external returns (uint256)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "token",
                                              "referencedDeclaration": 6703,
                                              "type": "contract StandardToken"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "isConstant": false,
                                                  "isLValue": true,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "type": "struct TokenCapGC.Parameters storage ref"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "overloadedDeclarations": [
                                                        null
                                                      ],
                                                      "referencedDeclaration": 6710,
                                                      "type": "mapping(bytes32 => struct TokenCapGC.Parameters storage ref)",
                                                      "value": "params"
                                                    },
                                                    "id": 6793,
                                                    "name": "Identifier",
                                                    "src": "1998:6:13"
                                                  },
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "overloadedDeclarations": [
                                                        null
                                                      ],
                                                      "referencedDeclaration": 6777,
                                                      "type": "bytes32",
                                                      "value": "_paramsHash"
                                                    },
                                                    "id": 6794,
                                                    "name": "Identifier",
                                                    "src": "2005:11:13"
                                                  }
                                                ],
                                                "id": 6795,
                                                "name": "IndexAccess",
                                                "src": "1998:19:13"
                                              }
                                            ],
                                            "id": 6796,
                                            "name": "MemberAccess",
                                            "src": "1998:25:13"
                                          }
                                        ],
                                        "id": 6797,
                                        "name": "MemberAccess",
                                        "src": "1998:37:13"
                                      }
                                    ],
                                    "id": 6798,
                                    "name": "FunctionCall",
                                    "src": "1998:39:13"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "cap",
                                      "referencedDeclaration": 6705,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "type": "struct TokenCapGC.Parameters storage ref"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 6710,
                                              "type": "mapping(bytes32 => struct TokenCapGC.Parameters storage ref)",
                                              "value": "params"
                                            },
                                            "id": 6799,
                                            "name": "Identifier",
                                            "src": "2040:6:13"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 6777,
                                              "type": "bytes32",
                                              "value": "_paramsHash"
                                            },
                                            "id": 6800,
                                            "name": "Identifier",
                                            "src": "2047:11:13"
                                          }
                                        ],
                                        "id": 6801,
                                        "name": "IndexAccess",
                                        "src": "2040:19:13"
                                      }
                                    ],
                                    "id": 6802,
                                    "name": "MemberAccess",
                                    "src": "2040:23:13"
                                  }
                                ],
                                "id": 6803,
                                "name": "BinaryOperation",
                                "src": "1998:65:13"
                              }
                            ],
                            "id": 6804,
                            "name": "TupleExpression",
                            "src": "1996:68:13"
                          }
                        ],
                        "id": 6805,
                        "name": "BinaryOperation",
                        "src": "1933:131:13"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 6783
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "66616c7365",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "bool",
                                  "type": "bool",
                                  "value": "false"
                                },
                                "id": 6806,
                                "name": "Literal",
                                "src": "2087:5:13"
                              }
                            ],
                            "id": 6807,
                            "name": "Return",
                            "src": "2080:12:13"
                          }
                        ],
                        "id": 6808,
                        "name": "Block",
                        "src": "2066:39:13"
                      }
                    ],
                    "id": 6809,
                    "name": "IfStatement",
                    "src": "1929:176:13"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 6783
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "hexvalue": "74727565",
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "subdenomination": null,
                          "token": "bool",
                          "type": "bool",
                          "value": "true"
                        },
                        "id": 6810,
                        "name": "Literal",
                        "src": "2121:4:13"
                      }
                    ],
                    "id": 6811,
                    "name": "Return",
                    "src": "2114:11:13"
                  }
                ],
                "id": 6812,
                "name": "Block",
                "src": "1919:213:13"
              }
            ],
            "id": 6813,
            "name": "FunctionDefinition",
            "src": "1842:290:13"
          }
        ],
        "id": 6814,
        "name": "ContractDefinition",
        "src": "201:1933:13"
      }
    ],
    "id": 6815,
    "name": "SourceUnit",
    "src": "0:2135:13"
  },
  "compiler": {
    "name": "solc",
    "version": "0.4.18+commit.9cf6e910.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "1.0.1",
  "updatedAt": "2018-02-04T21:57:39.059Z"
}