{
  "contractName": "SignaturesLibrary",
  "abi": [
    {
      "constant": true,
      "inputs": [
        {
          "name": "signer",
          "type": "address"
        },
        {
          "name": "hash",
          "type": "bytes32"
        },
        {
          "components": [
            {
              "name": "v",
              "type": "uint8"
            },
            {
              "name": "r",
              "type": "bytes32"
            },
            {
              "name": "s",
              "type": "bytes32"
            }
          ],
          "name": "signature",
          "type": "tuple"
        }
      ],
      "name": "isValidSignature",
      "outputs": [
        {
          "name": "valid",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "pure",
      "type": "function"
    }
  ],
  "bytecode": "0x608060405234801561001057600080fd5b506103fe806100206000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063578911ac14610046575b600080fd5b34801561005257600080fd5b5061006d60048036036100689190810190610261565b610083565b60405161007a91906102dd565b60405180910390f35b6000806040805190810160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250846040518083805190602001908083835b6020831015156100f257805182526020820191506020810190506020830392506100cd565b6001836020036101000a038019825116818451168082178552505050505050905001826000191660001916815260200192505050604051809103902090508473ffffffffffffffffffffffffffffffffffffffff166001828560000151866020015187604001516040516000815260200160405260405161017694939291906102f8565b60206040516020810390808403906000865af115801561019a573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16149150509392505050565b60006101d1823561038d565b905092915050565b60006101e582356103ad565b905092915050565b6000606082840312156101ff57600080fd5b610209606061033d565b905060006102198482850161024d565b600083015250602061022d848285016101d9565b6020830152506040610241848285016101d9565b60408301525092915050565b600061025982356103b7565b905092915050565b600080600060a0848603121561027657600080fd5b6000610284868287016101c5565b9350506020610295868287016101d9565b92505060406102a6868287016101ed565b9150509250925092565b6102b98161036a565b82525050565b6102c881610376565b82525050565b6102d781610380565b82525050565b60006020820190506102f260008301846102b0565b92915050565b600060808201905061030d60008301876102bf565b61031a60208301866102ce565b61032760408301856102bf565b61033460608301846102bf565b95945050505050565b6000604051905081810181811067ffffffffffffffff8211171561036057600080fd5b8060405250919050565b60008115159050919050565b6000819050919050565b600060ff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff821690509190505600a265627a7a72305820054d1e5f2c10db1f953ea1dc384c23996f25fcab530269d21a793b85a849094b6c6578706572696d656e74616cf50037",
  "deployedBytecode": "0x608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063578911ac14610046575b600080fd5b34801561005257600080fd5b5061006d60048036036100689190810190610261565b610083565b60405161007a91906102dd565b60405180910390f35b6000806040805190810160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250846040518083805190602001908083835b6020831015156100f257805182526020820191506020810190506020830392506100cd565b6001836020036101000a038019825116818451168082178552505050505050905001826000191660001916815260200192505050604051809103902090508473ffffffffffffffffffffffffffffffffffffffff166001828560000151866020015187604001516040516000815260200160405260405161017694939291906102f8565b60206040516020810390808403906000865af115801561019a573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16149150509392505050565b60006101d1823561038d565b905092915050565b60006101e582356103ad565b905092915050565b6000606082840312156101ff57600080fd5b610209606061033d565b905060006102198482850161024d565b600083015250602061022d848285016101d9565b6020830152506040610241848285016101d9565b60408301525092915050565b600061025982356103b7565b905092915050565b600080600060a0848603121561027657600080fd5b6000610284868287016101c5565b9350506020610295868287016101d9565b92505060406102a6868287016101ed565b9150509250925092565b6102b98161036a565b82525050565b6102c881610376565b82525050565b6102d781610380565b82525050565b60006020820190506102f260008301846102b0565b92915050565b600060808201905061030d60008301876102bf565b61031a60208301866102ce565b61032760408301856102bf565b61033460608301846102bf565b95945050505050565b6000604051905081810181811067ffffffffffffffff8211171561036057600080fd5b8060405250919050565b60008115159050919050565b6000819050919050565b600060ff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff821690509190505600a265627a7a72305820054d1e5f2c10db1f953ea1dc384c23996f25fcab530269d21a793b85a849094b6c6578706572696d656e74616cf50037",
  "sourceMap": "61:437:14:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;61:437:14;;;;;;;",
  "deployedSourceMap": "61:437:14:-;;;;;;;;;;;;;;;;;;;;;;;;228:268;;8:9:-1;5:2;;;30:1;27;20:12;5:2;228:268:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;346:10;363:20;396:6;;;;;;;;;;;;;;;;;;404:4;386:23;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;386:23:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;363:46;;486:6;420:72;;:62;430:12;444:9;:11;;;457:9;:11;;;470:9;:11;;;420:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;420:62:14;;;;;;;;:72;;;413:79;;228:268;;;;;;:::o;5:118:-1:-;;72:46;110:6;97:20;72:46;;;63:55;;57:66;;;;;130:118;;197:46;235:6;222:20;197:46;;;188:55;;182:66;;;;;301:606;;422:4;410:9;405:3;401:19;397:30;394:2;;;440:1;437;430:12;394:2;458:20;473:4;458:20;;;449:29;;525:1;556:47;599:3;590:6;579:9;575:22;556:47;;;550:3;543:5;539:15;532:72;488:127;662:2;695:49;740:3;731:6;720:9;716:22;695:49;;;688:4;681:5;677:16;670:75;625:131;803:2;836:49;881:3;872:6;861:9;857:22;836:49;;;829:4;822:5;818:16;811:75;766:131;388:519;;;;;914:114;;979:44;1015:6;1002:20;979:44;;;970:53;;964:64;;;;;1035:556;;;;1205:3;1193:9;1184:7;1180:23;1176:33;1173:2;;;1222:1;1219;1212:12;1173:2;1257:1;1274:53;1319:7;1310:6;1299:9;1295:22;1274:53;;;1264:63;;1236:97;1364:2;1382:53;1427:7;1418:6;1407:9;1403:22;1382:53;;;1372:63;;1343:98;1472:2;1490:85;1567:7;1558:6;1547:9;1543:22;1490:85;;;1480:95;;1451:130;1167:424;;;;;;1598:101;1665:28;1687:5;1665:28;;;1660:3;1653:41;1647:52;;;1706:110;1779:31;1804:5;1779:31;;;1774:3;1767:44;1761:55;;;1823:104;1892:29;1915:5;1892:29;;;1887:3;1880:42;1874:53;;;1934:181;;2036:2;2025:9;2021:18;2013:26;;2050:55;2102:1;2091:9;2087:17;2078:6;2050:55;;;2007:108;;;;;2122:489;;2310:3;2299:9;2295:19;2287:27;;2325:61;2383:1;2372:9;2368:17;2359:6;2325:61;;;2397:58;2451:2;2440:9;2436:18;2427:6;2397:58;;;2466:62;2524:2;2513:9;2509:18;2500:6;2466:62;;;2539;2597:2;2586:9;2582:18;2573:6;2539:62;;;2281:330;;;;;;;;2618:256;;2680:2;2674:9;2664:19;;2718:4;2710:6;2706:17;2817:6;2805:10;2802:22;2781:18;2769:10;2766:34;2763:62;2760:2;;;2838:1;2835;2828:12;2760:2;2858:10;2854:2;2847:22;2658:216;;;;;2881:92;;2961:5;2954:13;2947:21;2936:32;;2930:43;;;;2980:79;;3049:5;3038:16;;3032:27;;;;3066:88;;3144:4;3137:5;3133:16;3122:27;;3116:38;;;;3161:128;;3241:42;3234:5;3230:54;3219:65;;3213:76;;;;3296:79;;3365:5;3354:16;;3348:27;;;;3382:88;;3460:4;3453:5;3449:16;3438:27;;3432:38;;;",
  "source": "pragma solidity ^0.4.24;\npragma experimental ABIEncoderV2;\n\n\ncontract SignaturesLibrary {\n\tbytes constant internal PREFIX = \"\\x19Ethereum Signed Message:\\n32\";\n\n\tstruct ECDSASignature {\n\t\tuint8 v;\n\t\tbytes32 r;\n\t\tbytes32 s;\n\t}\n\n\tfunction isValidSignature(\n\t\taddress signer,\n\t\tbytes32 hash,\n\t\tECDSASignature signature\n\t)\n\t\tpublic\n\t\tpure\n\t\treturns (bool valid)\n\t{\n\t\tbytes32 prefixedHash = keccak256(PREFIX, hash);\n\t\treturn ecrecover(prefixedHash, signature.v, signature.r, signature.s) == signer;\n\t}\n}\n",
  "sourcePath": "/Users/graemeboy/Dharma/experimental/contracts/src/shared/libraries/SignaturesLibrary.sol",
  "ast": {
    "absolutePath": "/Users/graemeboy/Dharma/experimental/contracts/src/shared/libraries/SignaturesLibrary.sol",
    "exportedSymbols": {
      "SignaturesLibrary": [
        1210
      ]
    },
    "id": 1211,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1167,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:14"
      },
      {
        "id": 1168,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "25:33:14"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 1210,
        "linearizedBaseContracts": [
          1210
        ],
        "name": "SignaturesLibrary",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "id": 1171,
            "name": "PREFIX",
            "nodeType": "VariableDeclaration",
            "scope": 1210,
            "src": "91:67:14",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes_memory",
              "typeString": "bytes"
            },
            "typeName": {
              "id": 1169,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "91:5:14",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332",
              "id": 1170,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "124:34:14",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73",
                "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\""
              },
              "value": "\u0019Ethereum Signed Message:\n32"
            },
            "visibility": "internal"
          },
          {
            "canonicalName": "SignaturesLibrary.ECDSASignature",
            "id": 1178,
            "members": [
              {
                "constant": false,
                "id": 1173,
                "name": "v",
                "nodeType": "VariableDeclaration",
                "scope": 1178,
                "src": "188:7:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint8",
                  "typeString": "uint8"
                },
                "typeName": {
                  "id": 1172,
                  "name": "uint8",
                  "nodeType": "ElementaryTypeName",
                  "src": "188:5:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 1175,
                "name": "r",
                "nodeType": "VariableDeclaration",
                "scope": 1178,
                "src": "199:9:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes32",
                  "typeString": "bytes32"
                },
                "typeName": {
                  "id": 1174,
                  "name": "bytes32",
                  "nodeType": "ElementaryTypeName",
                  "src": "199:7:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 1177,
                "name": "s",
                "nodeType": "VariableDeclaration",
                "scope": 1178,
                "src": "212:9:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes32",
                  "typeString": "bytes32"
                },
                "typeName": {
                  "id": 1176,
                  "name": "bytes32",
                  "nodeType": "ElementaryTypeName",
                  "src": "212:7:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  }
                },
                "value": null,
                "visibility": "internal"
              }
            ],
            "name": "ECDSASignature",
            "nodeType": "StructDefinition",
            "scope": 1210,
            "src": "162:63:14",
            "visibility": "public"
          },
          {
            "body": {
              "id": 1208,
              "nodeType": "Block",
              "src": "359:137:14",
              "statements": [
                {
                  "assignments": [
                    1190
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1190,
                      "name": "prefixedHash",
                      "nodeType": "VariableDeclaration",
                      "scope": 1209,
                      "src": "363:20:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 1189,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "363:7:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 1195,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1192,
                        "name": "PREFIX",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1171,
                        "src": "396:6:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 1193,
                        "name": "hash",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1182,
                        "src": "404:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 1191,
                      "name": "keccak256",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1313,
                      "src": "386:9:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$",
                        "typeString": "function () pure returns (bytes32)"
                      }
                    },
                    "id": 1194,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "386:23:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "363:46:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 1206,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 1197,
                          "name": "prefixedHash",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1190,
                          "src": "430:12:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 1198,
                            "name": "signature",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1184,
                            "src": "444:9:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_ECDSASignature_$1178_memory_ptr",
                              "typeString": "struct SignaturesLibrary.ECDSASignature memory"
                            }
                          },
                          "id": 1199,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "v",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1173,
                          "src": "444:11:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 1200,
                            "name": "signature",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1184,
                            "src": "457:9:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_ECDSASignature_$1178_memory_ptr",
                              "typeString": "struct SignaturesLibrary.ECDSASignature memory"
                            }
                          },
                          "id": 1201,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "r",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1175,
                          "src": "457:11:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 1202,
                            "name": "signature",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1184,
                            "src": "470:9:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_ECDSASignature_$1178_memory_ptr",
                              "typeString": "struct SignaturesLibrary.ECDSASignature memory"
                            }
                          },
                          "id": 1203,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "s",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1177,
                          "src": "470:11:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          },
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        ],
                        "id": 1196,
                        "name": "ecrecover",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1311,
                        "src": "420:9:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$",
                          "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)"
                        }
                      },
                      "id": 1204,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "420:62:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 1205,
                      "name": "signer",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1180,
                      "src": "486:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "420:72:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 1188,
                  "id": 1207,
                  "nodeType": "Return",
                  "src": "413:79:14"
                }
              ]
            },
            "documentation": null,
            "id": 1209,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "isValidSignature",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1185,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1180,
                  "name": "signer",
                  "nodeType": "VariableDeclaration",
                  "scope": 1209,
                  "src": "257:14:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1179,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "257:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1182,
                  "name": "hash",
                  "nodeType": "VariableDeclaration",
                  "scope": 1209,
                  "src": "275:12:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 1181,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "275:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1184,
                  "name": "signature",
                  "nodeType": "VariableDeclaration",
                  "scope": 1209,
                  "src": "291:24:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_ECDSASignature_$1178_memory_ptr",
                    "typeString": "struct SignaturesLibrary.ECDSASignature"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1183,
                    "name": "ECDSASignature",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1178,
                    "src": "291:14:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_ECDSASignature_$1178_storage_ptr",
                      "typeString": "struct SignaturesLibrary.ECDSASignature"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "253:65:14"
            },
            "payable": false,
            "returnParameters": {
              "id": 1188,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1187,
                  "name": "valid",
                  "nodeType": "VariableDeclaration",
                  "scope": 1209,
                  "src": "346:10:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1186,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "346:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "345:12:14"
            },
            "scope": 1210,
            "src": "228:268:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 1211,
        "src": "61:437:14"
      }
    ],
    "src": "0:499:14"
  },
  "legacyAST": {
    "absolutePath": "/Users/graemeboy/Dharma/experimental/contracts/src/shared/libraries/SignaturesLibrary.sol",
    "exportedSymbols": {
      "SignaturesLibrary": [
        1210
      ]
    },
    "id": 1211,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1167,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:14"
      },
      {
        "id": 1168,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "25:33:14"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 1210,
        "linearizedBaseContracts": [
          1210
        ],
        "name": "SignaturesLibrary",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "id": 1171,
            "name": "PREFIX",
            "nodeType": "VariableDeclaration",
            "scope": 1210,
            "src": "91:67:14",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes_memory",
              "typeString": "bytes"
            },
            "typeName": {
              "id": 1169,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "91:5:14",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332",
              "id": 1170,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "124:34:14",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73",
                "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\""
              },
              "value": "\u0019Ethereum Signed Message:\n32"
            },
            "visibility": "internal"
          },
          {
            "canonicalName": "SignaturesLibrary.ECDSASignature",
            "id": 1178,
            "members": [
              {
                "constant": false,
                "id": 1173,
                "name": "v",
                "nodeType": "VariableDeclaration",
                "scope": 1178,
                "src": "188:7:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint8",
                  "typeString": "uint8"
                },
                "typeName": {
                  "id": 1172,
                  "name": "uint8",
                  "nodeType": "ElementaryTypeName",
                  "src": "188:5:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 1175,
                "name": "r",
                "nodeType": "VariableDeclaration",
                "scope": 1178,
                "src": "199:9:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes32",
                  "typeString": "bytes32"
                },
                "typeName": {
                  "id": 1174,
                  "name": "bytes32",
                  "nodeType": "ElementaryTypeName",
                  "src": "199:7:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 1177,
                "name": "s",
                "nodeType": "VariableDeclaration",
                "scope": 1178,
                "src": "212:9:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes32",
                  "typeString": "bytes32"
                },
                "typeName": {
                  "id": 1176,
                  "name": "bytes32",
                  "nodeType": "ElementaryTypeName",
                  "src": "212:7:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  }
                },
                "value": null,
                "visibility": "internal"
              }
            ],
            "name": "ECDSASignature",
            "nodeType": "StructDefinition",
            "scope": 1210,
            "src": "162:63:14",
            "visibility": "public"
          },
          {
            "body": {
              "id": 1208,
              "nodeType": "Block",
              "src": "359:137:14",
              "statements": [
                {
                  "assignments": [
                    1190
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1190,
                      "name": "prefixedHash",
                      "nodeType": "VariableDeclaration",
                      "scope": 1209,
                      "src": "363:20:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 1189,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "363:7:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 1195,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1192,
                        "name": "PREFIX",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1171,
                        "src": "396:6:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 1193,
                        "name": "hash",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1182,
                        "src": "404:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 1191,
                      "name": "keccak256",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1313,
                      "src": "386:9:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$",
                        "typeString": "function () pure returns (bytes32)"
                      }
                    },
                    "id": 1194,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "386:23:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "363:46:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 1206,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 1197,
                          "name": "prefixedHash",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1190,
                          "src": "430:12:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 1198,
                            "name": "signature",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1184,
                            "src": "444:9:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_ECDSASignature_$1178_memory_ptr",
                              "typeString": "struct SignaturesLibrary.ECDSASignature memory"
                            }
                          },
                          "id": 1199,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "v",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1173,
                          "src": "444:11:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 1200,
                            "name": "signature",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1184,
                            "src": "457:9:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_ECDSASignature_$1178_memory_ptr",
                              "typeString": "struct SignaturesLibrary.ECDSASignature memory"
                            }
                          },
                          "id": 1201,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "r",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1175,
                          "src": "457:11:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 1202,
                            "name": "signature",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1184,
                            "src": "470:9:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_ECDSASignature_$1178_memory_ptr",
                              "typeString": "struct SignaturesLibrary.ECDSASignature memory"
                            }
                          },
                          "id": 1203,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "s",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1177,
                          "src": "470:11:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          },
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        ],
                        "id": 1196,
                        "name": "ecrecover",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1311,
                        "src": "420:9:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$",
                          "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)"
                        }
                      },
                      "id": 1204,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "420:62:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 1205,
                      "name": "signer",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1180,
                      "src": "486:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "420:72:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 1188,
                  "id": 1207,
                  "nodeType": "Return",
                  "src": "413:79:14"
                }
              ]
            },
            "documentation": null,
            "id": 1209,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "isValidSignature",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1185,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1180,
                  "name": "signer",
                  "nodeType": "VariableDeclaration",
                  "scope": 1209,
                  "src": "257:14:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1179,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "257:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1182,
                  "name": "hash",
                  "nodeType": "VariableDeclaration",
                  "scope": 1209,
                  "src": "275:12:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 1181,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "275:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1184,
                  "name": "signature",
                  "nodeType": "VariableDeclaration",
                  "scope": 1209,
                  "src": "291:24:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_ECDSASignature_$1178_memory_ptr",
                    "typeString": "struct SignaturesLibrary.ECDSASignature"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1183,
                    "name": "ECDSASignature",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1178,
                    "src": "291:14:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_ECDSASignature_$1178_storage_ptr",
                      "typeString": "struct SignaturesLibrary.ECDSASignature"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "253:65:14"
            },
            "payable": false,
            "returnParameters": {
              "id": 1188,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1187,
                  "name": "valid",
                  "nodeType": "VariableDeclaration",
                  "scope": 1209,
                  "src": "346:10:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1186,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "346:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "345:12:14"
            },
            "scope": 1210,
            "src": "228:268:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 1211,
        "src": "61:437:14"
      }
    ],
    "src": "0:499:14"
  },
  "compiler": {
    "name": "solc",
    "version": "0.4.24+commit.e67f0147.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "2.0.1",
  "updatedAt": "2018-10-16T21:20:58.393Z"
}