{
  "contractName": "PaidOracle",
  "abi": [
    {
      "constant": true,
      "inputs": [],
      "name": "dataSource",
      "outputs": [
        {
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "reward",
      "outputs": [
        {
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "name": "",
          "type": "bytes32"
        }
      ],
      "name": "isResultSet",
      "outputs": [
        {
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "_result",
          "type": "bytes"
        }
      ],
      "name": "setResult",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "name": "id",
          "type": "bytes32"
        }
      ],
      "name": "resultFor",
      "outputs": [
        {
          "name": "",
          "type": "bytes"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "name": "_result",
          "type": "bytes"
        },
        {
          "indexed": false,
          "name": "_sender",
          "type": "address"
        }
      ],
      "name": "ResultSet",
      "type": "event"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "_dataSource",
          "type": "address"
        }
      ],
      "name": "initialize",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "_dataSource",
          "type": "address"
        },
        {
          "name": "_reward",
          "type": "uint256"
        }
      ],
      "name": "initialize",
      "outputs": [],
      "payable": true,
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "getReward",
      "outputs": [
        {
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "bytecode": "0x608060405234801561001057600080fd5b50610d95806100206000396000f30060806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631b076edc14610093578063228cb733146100ea5780633d18b9121461011557806353bac2c914610140578063944dc9fe14610189578063c4d66de8146101f2578063cd6dc68714610235578063d09cc57e14610275575b600080fd5b34801561009f57600080fd5b506100a861031f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100f657600080fd5b506100ff610345565b6040518082815260200191505060405180910390f35b34801561012157600080fd5b5061012a61034b565b6040518082815260200191505060405180910390f35b34801561014c57600080fd5b5061016f6004803603810190808035600019169060200190929190505050610375565b604051808215151515815260200191505060405180910390f35b34801561019557600080fd5b506101f0600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061038e565b005b3480156101fe57600080fd5b50610233600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610485565b005b610273600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105fc565b005b34801561028157600080fd5b506102a460048036038101908080356000191690602001909291905050506107e8565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102e45780820151818401526020810190506102c9565b50505050905090810190601f1680156103115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b603460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60355481565b60006103706035543073ffffffffffffffffffffffffffffffffffffffff16316109b2565b905090565b6000603460009054906101000a900460ff169050919050565b603460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610479576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f5468652063616c6c6572206973206e6f7420746865206461746120736f75726381526020017f652e00000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b610482816109cb565b50565b60008060019054906101000a900460ff16806104a557506104a4610b5e565b5b806104bc57506000809054906101000a900460ff16155b1515610556576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff02191690831515021790555081603460016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548160ff0219169083151502179055505050565b60008060019054906101000a900460ff168061061c575061061b610b5e565b5b8061063357506000809054906101000a900460ff16155b15156106cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156107b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f526571756972652061206e6f6e2d6e756c6c2064617461536f7572636500000081525060200191505060405180910390fd5b6107c283610485565b8160358190555080600060016101000a81548160ff021916908315150217905550505050565b60606000600102600019168260001916141515610893576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f54686973206f7261636c6520646f6573206e6f7420737570706f72742069647381526020017f2e0000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61089c82610375565b1515610910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f54686520726573756c7420686173206e6f74206265656e207365742e0000000081525060200191505060405180910390fd5b60338054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109a65780601f1061097b576101008083540402835291602001916109a6565b820191906000526020600020905b81548152906001019060200180831161098957829003601f168201915b50505050509050919050565b60008183106109c157816109c3565b825b905092915050565b603460009054906101000a900460ff16151515610a50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f526573756c742068617320616c7265616479206265656e207365742e0000000081525060200191505060405180910390fd5b8060339080519060200190610a66929190610cc4565b506001603460006101000a81548160ff0219169083151502179055507fec9117e779c7185025120058429df00dfe012336e6dfe5ad326b4973db23c2d2813360405180806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019080838360005b83811015610b17578082015181840152602081019050610afc565b50505050905090810190601f168015610b445780820380516001836020036101000a031916815260200191505b50935050505060405180910390a1610b5b81610b6f565b50565b600080303b90506000811491505090565b603460009054906101000a900460ff161515610bf3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f526573756c74206861736e2774206265656e20736574207965742e000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16603460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515610c5157600080fd5b603460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc610c9561034b565b9081150290604051600060405180830381858888f19350505050158015610cc0573d6000803e3d6000fd5b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610d0557805160ff1916838001178555610d33565b82800160010185558215610d33579182015b82811115610d32578251825591602001919060010190610d17565b5b509050610d409190610d44565b5090565b610d6691905b80821115610d62576000816000905550600101610d4a565b5090565b905600a165627a7a723058206c15c177d7a8a2c9b08fa86dee4b2187ce8a1832d4b1df0904e5d94ca78299370029",
  "deployedBytecode": "0x60806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631b076edc14610093578063228cb733146100ea5780633d18b9121461011557806353bac2c914610140578063944dc9fe14610189578063c4d66de8146101f2578063cd6dc68714610235578063d09cc57e14610275575b600080fd5b34801561009f57600080fd5b506100a861031f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100f657600080fd5b506100ff610345565b6040518082815260200191505060405180910390f35b34801561012157600080fd5b5061012a61034b565b6040518082815260200191505060405180910390f35b34801561014c57600080fd5b5061016f6004803603810190808035600019169060200190929190505050610375565b604051808215151515815260200191505060405180910390f35b34801561019557600080fd5b506101f0600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061038e565b005b3480156101fe57600080fd5b50610233600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610485565b005b610273600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105fc565b005b34801561028157600080fd5b506102a460048036038101908080356000191690602001909291905050506107e8565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102e45780820151818401526020810190506102c9565b50505050905090810190601f1680156103115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b603460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60355481565b60006103706035543073ffffffffffffffffffffffffffffffffffffffff16316109b2565b905090565b6000603460009054906101000a900460ff169050919050565b603460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610479576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f5468652063616c6c6572206973206e6f7420746865206461746120736f75726381526020017f652e00000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b610482816109cb565b50565b60008060019054906101000a900460ff16806104a557506104a4610b5e565b5b806104bc57506000809054906101000a900460ff16155b1515610556576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff02191690831515021790555081603460016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548160ff0219169083151502179055505050565b60008060019054906101000a900460ff168061061c575061061b610b5e565b5b8061063357506000809054906101000a900460ff16155b15156106cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156107b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f526571756972652061206e6f6e2d6e756c6c2064617461536f7572636500000081525060200191505060405180910390fd5b6107c283610485565b8160358190555080600060016101000a81548160ff021916908315150217905550505050565b60606000600102600019168260001916141515610893576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f54686973206f7261636c6520646f6573206e6f7420737570706f72742069647381526020017f2e0000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61089c82610375565b1515610910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f54686520726573756c7420686173206e6f74206265656e207365742e0000000081525060200191505060405180910390fd5b60338054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109a65780601f1061097b576101008083540402835291602001916109a6565b820191906000526020600020905b81548152906001019060200180831161098957829003601f168201915b50505050509050919050565b60008183106109c157816109c3565b825b905092915050565b603460009054906101000a900460ff16151515610a50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f526573756c742068617320616c7265616479206265656e207365742e0000000081525060200191505060405180910390fd5b8060339080519060200190610a66929190610cc4565b506001603460006101000a81548160ff0219169083151502179055507fec9117e779c7185025120058429df00dfe012336e6dfe5ad326b4973db23c2d2813360405180806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019080838360005b83811015610b17578082015181840152602081019050610afc565b50505050905090810190601f168015610b445780820380516001836020036101000a031916815260200191505b50935050505060405180910390a1610b5b81610b6f565b50565b600080303b90506000811491505090565b603460009054906101000a900460ff161515610bf3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f526573756c74206861736e2774206265656e20736574207965742e000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16603460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515610c5157600080fd5b603460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc610c9561034b565b9081150290604051600060405180830381858888f19350505050158015610cc0573d6000803e3d6000fd5b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610d0557805160ff1916838001178555610d33565b82800160010185558215610d33579182015b82811115610d32578251825591602001919060010190610d17565b5b509050610d409190610d44565b5090565b610d6691905b80821115610d62576000816000905550600101610d4a565b5090565b905600a165627a7a723058206c15c177d7a8a2c9b08fa86dee4b2187ce8a1832d4b1df0904e5d94ca78299370029",
  "sourceMap": "323:970:17:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;323:970:17;;;;;;;",
  "deployedSourceMap": "323:970:17:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;314:25:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;314:25:11;;;;;;;;;;;;;;;;;;;;;;;;;;;363:21:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;363:21:17;;;;;;;;;;;;;;;;;;;;;;;926:129;;8:9:-1;5:2;;;30:1;27;20:12;5:2;926:129:17;;;;;;;;;;;;;;;;;;;;;;;945:93:15;;8:9:-1;5:2;;;30:1;27;20:12;5:2;945:93:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;651:148:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;651:148:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;459:95;;8:9:-1;5:2;;;30:1;27;20:12;5:2;459:95:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;566:253:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;625:215:15;;8:9:-1;5:2;;;30:1;27;20:12;5:2;625:215:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;625:215:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;314:25:11;;;;;;;;;;;;;:::o;363:21:17:-;;;;:::o;926:129::-;987:7;1011:39;1020:6;;1036:4;1028:21;;;1011:8;:39::i;:::-;1004:46;;926:129;:::o;945:93:15:-;1003:4;1022:11;;;;;;;;;;;1015:18;;945:93;;;:::o;651:148:11:-;720:10;;;;;;;;;;;706:24;;:10;:24;;;698:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;775:19;786:7;775:10;:19::i;:::-;651:148;:::o;459:95::-;1121:20:29;1016:12;;;;;;;;;;;:31;;;;1032:15;:13;:15::i;:::-;1016:31;:47;;;;1052:11;;;;;;;;;;;1051:12;1016:47;1008:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1144:12;;;;;;;;;;;1121:35;;1177:4;1162:12;;:19;;;;;;;;;;;;;;;;;;1201:4;1187:11;;:18;;;;;;;;;;;;;;;;;;538:11:11;525:10;;:24;;;;;;;;;;;;;;;;;;1235:15:29;1220:12;;:30;;;;;;;;;;;;;;;;;;459:95:11;;:::o;566:253:17:-;1121:20:29;1016:12;;;;;;;;;;;:31;;;;1032:15;:13;:15::i;:::-;1016:31;:47;;;;1052:11;;;;;;;;;;;1051:12;1016:47;1008:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1144:12;;;;;;;;;;;1121:35;;1177:4;1162:12;;:19;;;;;;;;;;;;;;;;;;1201:4;1187:11;;:18;;;;;;;;;;;;;;;;;;715:1:17;692:25;;:11;:25;;;;684:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;757:35;780:11;757:22;:35::i;:::-;807:7;798:6;:16;;;;1235:15:29;1220:12;;:30;;;;;;;;;;;;;;;;;;566:253:17;;;:::o;625:215:15:-;679:5;714:1;706:10;;700:16;;;:2;:16;;;;692:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;768:15;780:2;768:11;:15::i;:::-;760:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;829:6;822:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;625:215;;;:::o;203:98:26:-;261:7;287:1;283;:5;:13;;295:1;283:13;;;291:1;283:13;276:20;;203:98;;;;:::o;1259:223:15:-;1318:11;;;;;;;;;;;1317:12;1309:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1377:7;1368:6;:16;;;;;;;;;;;;:::i;:::-;;1404:4;1390:11;;:18;;;;;;;;;;;;;;;;;;1419:30;1429:7;1438:10;1419:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1419:30:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1455:22;1469:7;1455:13;:22::i;:::-;1259:223;:::o;1341:467:29:-;1388:4;1729:10;1774:7;1762:20;1756:26;;1802:1;1796:2;:7;1789:14;;1341:467;;:::o;1095:196:17:-;1166:11;;;;;;;;;;;1158:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1245:1;1223:24;;:10;;;;;;;;;;;:24;;;;1215:33;;;;;;;;1254:10;;;;;;;;;;;:19;;:32;1274:11;:9;:11::i;:::-;1254:32;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1254:32:17;1095:196;:::o;323:970::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o",
  "source": "pragma solidity ^0.4.24;\n\nimport \"./BasicOracle.sol\";\nimport \"openzeppelin-eth/contracts/math/Math.sol\";\nimport \"openzeppelin-eth/contracts/math/SafeMath.sol\";\n\n/**\n * @title PaidOracle\n * @dev BasicOracle with reward set in constructor. The reward is transfered to \n * dataSource when the result is successfully set.\n */\n\ncontract PaidOracle is BasicOracle {\n\n  uint256 public reward;\n\n  /**\n   * @dev PaidOracle constructor\n   * @param _dataSource The address that is able to set the result\n   * @param _reward The reward for dataSource setting the result\n   */\n  function initialize(\n    address _dataSource,\n    uint256 _reward\n  )\n    public \n    payable\n    initializer\n  {\n    require(_dataSource != address(0), \"Require a non-null dataSource\");\n    BasicOracle.initialize(_dataSource);\n    reward = _reward;\n  }\n\n  /**\n   * @dev Returns the oracle reward or the contract's balance if it's less than the reward\n   */\n  function getReward() \n    public \n    view\n    returns \n    (uint256)\n  {\n    return Math.min(reward, address(this).balance);\n  }\n\n  /*\n   *  Internal functions\n   */\n  function _resultWasSet(bytes /*_result*/)\n    internal\n  {\n    require(resultIsSet, \"Result hasn't been set yet.\");\n    require(dataSource != address(0));\n    dataSource.transfer(getReward());\n  }\n}\n",
  "sourcePath": "/Users/mfcalvanese/dev/eth/tidbit-eth/contracts/Oracles/PaidOracle.sol",
  "ast": {
    "absolutePath": "/Users/mfcalvanese/dev/eth/tidbit-eth/contracts/Oracles/PaidOracle.sol",
    "exportedSymbols": {
      "PaidOracle": [
        896
      ]
    },
    "id": 897,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 818,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:17"
      },
      {
        "absolutePath": "/Users/mfcalvanese/dev/eth/tidbit-eth/contracts/Oracles/BasicOracle.sol",
        "file": "./BasicOracle.sol",
        "id": 819,
        "nodeType": "ImportDirective",
        "scope": 897,
        "sourceUnit": 257,
        "src": "26:27:17",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-eth/contracts/math/Math.sol",
        "file": "openzeppelin-eth/contracts/math/Math.sol",
        "id": 820,
        "nodeType": "ImportDirective",
        "scope": 897,
        "sourceUnit": 2945,
        "src": "54:50:17",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-eth/contracts/math/SafeMath.sol",
        "file": "openzeppelin-eth/contracts/math/SafeMath.sol",
        "id": 821,
        "nodeType": "ImportDirective",
        "scope": 897,
        "sourceUnit": 3073,
        "src": "105:54:17",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 822,
              "name": "BasicOracle",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 256,
              "src": "346:11:17",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BasicOracle_$256",
                "typeString": "contract BasicOracle"
              }
            },
            "id": 823,
            "nodeType": "InheritanceSpecifier",
            "src": "346:11:17"
          }
        ],
        "contractDependencies": [
          256,
          273,
          734,
          3241
        ],
        "contractKind": "contract",
        "documentation": "@title PaidOracle\n@dev BasicOracle with reward set in constructor. The reward is transfered to \ndataSource when the result is successfully set.",
        "fullyImplemented": true,
        "id": 896,
        "linearizedBaseContracts": [
          896,
          256,
          734,
          273,
          3241
        ],
        "name": "PaidOracle",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "id": 825,
            "name": "reward",
            "nodeType": "VariableDeclaration",
            "scope": 896,
            "src": "363:21:17",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 824,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "363:7:17",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 853,
              "nodeType": "Block",
              "src": "678:141:17",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 839,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 835,
                          "name": "_dataSource",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 827,
                          "src": "692:11:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 837,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "715:1:17",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 836,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "707:7:17",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 838,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "707:10:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "692:25:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "526571756972652061206e6f6e2d6e756c6c2064617461536f75726365",
                        "id": 840,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "719:31:17",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_2ca8759c2f094a78ecefd324a7cd9a91d7d1ed81aac5582ab7d6fcb7e4e3e953",
                          "typeString": "literal_string \"Require a non-null dataSource\""
                        },
                        "value": "Require a non-null dataSource"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_2ca8759c2f094a78ecefd324a7cd9a91d7d1ed81aac5582ab7d6fcb7e4e3e953",
                          "typeString": "literal_string \"Require a non-null dataSource\""
                        }
                      ],
                      "id": 834,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        3259,
                        3260
                      ],
                      "referencedDeclaration": 3260,
                      "src": "684:7:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 841,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "684:67:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 842,
                  "nodeType": "ExpressionStatement",
                  "src": "684:67:17"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 846,
                        "name": "_dataSource",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 827,
                        "src": "780:11:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 843,
                        "name": "BasicOracle",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 256,
                        "src": "757:11:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_BasicOracle_$256_$",
                          "typeString": "type(contract BasicOracle)"
                        }
                      },
                      "id": 845,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "initialize",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 237,
                      "src": "757:22:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
                        "typeString": "function (address)"
                      }
                    },
                    "id": 847,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "757:35:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 848,
                  "nodeType": "ExpressionStatement",
                  "src": "757:35:17"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 851,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 849,
                      "name": "reward",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 825,
                      "src": "798:6:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 850,
                      "name": "_reward",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 829,
                      "src": "807:7:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "798:16:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 852,
                  "nodeType": "ExpressionStatement",
                  "src": "798:16:17"
                }
              ]
            },
            "documentation": "@dev PaidOracle constructor\n@param _dataSource The address that is able to set the result\n@param _reward The reward for dataSource setting the result",
            "id": 854,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [
              {
                "arguments": null,
                "id": 832,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 831,
                  "name": "initializer",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 3222,
                  "src": "664:11:17",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "664:11:17"
              }
            ],
            "name": "initialize",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 830,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 827,
                  "name": "_dataSource",
                  "nodeType": "VariableDeclaration",
                  "scope": 854,
                  "src": "591:19:17",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 826,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "591:7:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 829,
                  "name": "_reward",
                  "nodeType": "VariableDeclaration",
                  "scope": 854,
                  "src": "616:15:17",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 828,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "616:7:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "585:50:17"
            },
            "payable": true,
            "returnParameters": {
              "id": 833,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "678:0:17"
            },
            "scope": 896,
            "src": "566:253:17",
            "stateMutability": "payable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 868,
              "nodeType": "Block",
              "src": "998:57:17",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 861,
                        "name": "reward",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 825,
                        "src": "1020:6:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 863,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3309,
                              "src": "1036:4:17",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_PaidOracle_$896",
                                "typeString": "contract PaidOracle"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_PaidOracle_$896",
                                "typeString": "contract PaidOracle"
                              }
                            ],
                            "id": 862,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "1028:7:17",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 864,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1028:13:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 865,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "balance",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "1028:21:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 859,
                        "name": "Math",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2944,
                        "src": "1011:4:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_Math_$2944_$",
                          "typeString": "type(library Math)"
                        }
                      },
                      "id": 860,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "min",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2911,
                      "src": "1011:8:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                      }
                    },
                    "id": 866,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1011:39:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 858,
                  "id": 867,
                  "nodeType": "Return",
                  "src": "1004:46:17"
                }
              ]
            },
            "documentation": "@dev Returns the oracle reward or the contract's balance if it's less than the reward",
            "id": 869,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "getReward",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 855,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "944:2:17"
            },
            "payable": false,
            "returnParameters": {
              "id": 858,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 857,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 869,
                  "src": "987:7:17",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 856,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "987:7:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "986:9:17"
            },
            "scope": 896,
            "src": "926:129:17",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 894,
              "nodeType": "Block",
              "src": "1152:139:17",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 875,
                        "name": "resultIsSet",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 655,
                        "src": "1166:11:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "526573756c74206861736e2774206265656e20736574207965742e",
                        "id": 876,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1179:29:17",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_203297f9b4ae0e67928e9b81457b688b55499f61cd14517483332bf3d48c7481",
                          "typeString": "literal_string \"Result hasn't been set yet.\""
                        },
                        "value": "Result hasn't been set yet."
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_203297f9b4ae0e67928e9b81457b688b55499f61cd14517483332bf3d48c7481",
                          "typeString": "literal_string \"Result hasn't been set yet.\""
                        }
                      ],
                      "id": 874,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        3259,
                        3260
                      ],
                      "referencedDeclaration": 3260,
                      "src": "1158:7:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 877,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1158:51:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 878,
                  "nodeType": "ExpressionStatement",
                  "src": "1158:51:17"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 884,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 880,
                          "name": "dataSource",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 225,
                          "src": "1223:10:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 882,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1245:1:17",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 881,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "1237:7:17",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 883,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1237:10:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "1223:24:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 879,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        3259,
                        3260
                      ],
                      "referencedDeclaration": 3259,
                      "src": "1215:7:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 885,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1215:33:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 886,
                  "nodeType": "ExpressionStatement",
                  "src": "1215:33:17"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 890,
                          "name": "getReward",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 869,
                          "src": "1274:9:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                            "typeString": "function () view returns (uint256)"
                          }
                        },
                        "id": 891,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1274:11:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 887,
                        "name": "dataSource",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 225,
                        "src": "1254:10:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "id": 889,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "transfer",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1254:19:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 892,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1254:32:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 893,
                  "nodeType": "ExpressionStatement",
                  "src": "1254:32:17"
                }
              ]
            },
            "documentation": null,
            "id": 895,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "_resultWasSet",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 872,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 871,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 895,
                  "src": "1118:5:17",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 870,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1118:5:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1117:19:17"
            },
            "payable": false,
            "returnParameters": {
              "id": 873,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1152:0:17"
            },
            "scope": 896,
            "src": "1095:196:17",
            "stateMutability": "nonpayable",
            "superFunction": 733,
            "visibility": "internal"
          }
        ],
        "scope": 897,
        "src": "323:970:17"
      }
    ],
    "src": "0:1294:17"
  },
  "legacyAST": {
    "absolutePath": "/Users/mfcalvanese/dev/eth/tidbit-eth/contracts/Oracles/PaidOracle.sol",
    "exportedSymbols": {
      "PaidOracle": [
        896
      ]
    },
    "id": 897,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 818,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:17"
      },
      {
        "absolutePath": "/Users/mfcalvanese/dev/eth/tidbit-eth/contracts/Oracles/BasicOracle.sol",
        "file": "./BasicOracle.sol",
        "id": 819,
        "nodeType": "ImportDirective",
        "scope": 897,
        "sourceUnit": 257,
        "src": "26:27:17",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-eth/contracts/math/Math.sol",
        "file": "openzeppelin-eth/contracts/math/Math.sol",
        "id": 820,
        "nodeType": "ImportDirective",
        "scope": 897,
        "sourceUnit": 2945,
        "src": "54:50:17",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-eth/contracts/math/SafeMath.sol",
        "file": "openzeppelin-eth/contracts/math/SafeMath.sol",
        "id": 821,
        "nodeType": "ImportDirective",
        "scope": 897,
        "sourceUnit": 3073,
        "src": "105:54:17",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 822,
              "name": "BasicOracle",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 256,
              "src": "346:11:17",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BasicOracle_$256",
                "typeString": "contract BasicOracle"
              }
            },
            "id": 823,
            "nodeType": "InheritanceSpecifier",
            "src": "346:11:17"
          }
        ],
        "contractDependencies": [
          256,
          273,
          734,
          3241
        ],
        "contractKind": "contract",
        "documentation": "@title PaidOracle\n@dev BasicOracle with reward set in constructor. The reward is transfered to \ndataSource when the result is successfully set.",
        "fullyImplemented": true,
        "id": 896,
        "linearizedBaseContracts": [
          896,
          256,
          734,
          273,
          3241
        ],
        "name": "PaidOracle",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "id": 825,
            "name": "reward",
            "nodeType": "VariableDeclaration",
            "scope": 896,
            "src": "363:21:17",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 824,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "363:7:17",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 853,
              "nodeType": "Block",
              "src": "678:141:17",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 839,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 835,
                          "name": "_dataSource",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 827,
                          "src": "692:11:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 837,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "715:1:17",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 836,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "707:7:17",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 838,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "707:10:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "692:25:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "526571756972652061206e6f6e2d6e756c6c2064617461536f75726365",
                        "id": 840,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "719:31:17",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_2ca8759c2f094a78ecefd324a7cd9a91d7d1ed81aac5582ab7d6fcb7e4e3e953",
                          "typeString": "literal_string \"Require a non-null dataSource\""
                        },
                        "value": "Require a non-null dataSource"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_2ca8759c2f094a78ecefd324a7cd9a91d7d1ed81aac5582ab7d6fcb7e4e3e953",
                          "typeString": "literal_string \"Require a non-null dataSource\""
                        }
                      ],
                      "id": 834,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        3259,
                        3260
                      ],
                      "referencedDeclaration": 3260,
                      "src": "684:7:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 841,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "684:67:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 842,
                  "nodeType": "ExpressionStatement",
                  "src": "684:67:17"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 846,
                        "name": "_dataSource",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 827,
                        "src": "780:11:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 843,
                        "name": "BasicOracle",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 256,
                        "src": "757:11:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_BasicOracle_$256_$",
                          "typeString": "type(contract BasicOracle)"
                        }
                      },
                      "id": 845,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "initialize",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 237,
                      "src": "757:22:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
                        "typeString": "function (address)"
                      }
                    },
                    "id": 847,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "757:35:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 848,
                  "nodeType": "ExpressionStatement",
                  "src": "757:35:17"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 851,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 849,
                      "name": "reward",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 825,
                      "src": "798:6:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 850,
                      "name": "_reward",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 829,
                      "src": "807:7:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "798:16:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 852,
                  "nodeType": "ExpressionStatement",
                  "src": "798:16:17"
                }
              ]
            },
            "documentation": "@dev PaidOracle constructor\n@param _dataSource The address that is able to set the result\n@param _reward The reward for dataSource setting the result",
            "id": 854,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [
              {
                "arguments": null,
                "id": 832,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 831,
                  "name": "initializer",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 3222,
                  "src": "664:11:17",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "664:11:17"
              }
            ],
            "name": "initialize",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 830,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 827,
                  "name": "_dataSource",
                  "nodeType": "VariableDeclaration",
                  "scope": 854,
                  "src": "591:19:17",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 826,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "591:7:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 829,
                  "name": "_reward",
                  "nodeType": "VariableDeclaration",
                  "scope": 854,
                  "src": "616:15:17",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 828,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "616:7:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "585:50:17"
            },
            "payable": true,
            "returnParameters": {
              "id": 833,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "678:0:17"
            },
            "scope": 896,
            "src": "566:253:17",
            "stateMutability": "payable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 868,
              "nodeType": "Block",
              "src": "998:57:17",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 861,
                        "name": "reward",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 825,
                        "src": "1020:6:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 863,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3309,
                              "src": "1036:4:17",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_PaidOracle_$896",
                                "typeString": "contract PaidOracle"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_PaidOracle_$896",
                                "typeString": "contract PaidOracle"
                              }
                            ],
                            "id": 862,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "1028:7:17",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 864,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1028:13:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 865,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "balance",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "1028:21:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 859,
                        "name": "Math",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2944,
                        "src": "1011:4:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_Math_$2944_$",
                          "typeString": "type(library Math)"
                        }
                      },
                      "id": 860,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "min",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2911,
                      "src": "1011:8:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                      }
                    },
                    "id": 866,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1011:39:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 858,
                  "id": 867,
                  "nodeType": "Return",
                  "src": "1004:46:17"
                }
              ]
            },
            "documentation": "@dev Returns the oracle reward or the contract's balance if it's less than the reward",
            "id": 869,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "getReward",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 855,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "944:2:17"
            },
            "payable": false,
            "returnParameters": {
              "id": 858,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 857,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 869,
                  "src": "987:7:17",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 856,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "987:7:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "986:9:17"
            },
            "scope": 896,
            "src": "926:129:17",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 894,
              "nodeType": "Block",
              "src": "1152:139:17",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 875,
                        "name": "resultIsSet",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 655,
                        "src": "1166:11:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "526573756c74206861736e2774206265656e20736574207965742e",
                        "id": 876,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1179:29:17",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_203297f9b4ae0e67928e9b81457b688b55499f61cd14517483332bf3d48c7481",
                          "typeString": "literal_string \"Result hasn't been set yet.\""
                        },
                        "value": "Result hasn't been set yet."
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_203297f9b4ae0e67928e9b81457b688b55499f61cd14517483332bf3d48c7481",
                          "typeString": "literal_string \"Result hasn't been set yet.\""
                        }
                      ],
                      "id": 874,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        3259,
                        3260
                      ],
                      "referencedDeclaration": 3260,
                      "src": "1158:7:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 877,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1158:51:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 878,
                  "nodeType": "ExpressionStatement",
                  "src": "1158:51:17"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 884,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 880,
                          "name": "dataSource",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 225,
                          "src": "1223:10:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 882,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1245:1:17",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 881,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "1237:7:17",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 883,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1237:10:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "1223:24:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 879,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        3259,
                        3260
                      ],
                      "referencedDeclaration": 3259,
                      "src": "1215:7:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 885,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1215:33:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 886,
                  "nodeType": "ExpressionStatement",
                  "src": "1215:33:17"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 890,
                          "name": "getReward",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 869,
                          "src": "1274:9:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                            "typeString": "function () view returns (uint256)"
                          }
                        },
                        "id": 891,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1274:11:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 887,
                        "name": "dataSource",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 225,
                        "src": "1254:10:17",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "id": 889,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "transfer",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1254:19:17",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 892,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1254:32:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 893,
                  "nodeType": "ExpressionStatement",
                  "src": "1254:32:17"
                }
              ]
            },
            "documentation": null,
            "id": 895,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "_resultWasSet",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 872,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 871,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 895,
                  "src": "1118:5:17",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 870,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1118:5:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1117:19:17"
            },
            "payable": false,
            "returnParameters": {
              "id": 873,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1152:0:17"
            },
            "scope": 896,
            "src": "1095:196:17",
            "stateMutability": "nonpayable",
            "superFunction": 733,
            "visibility": "internal"
          }
        ],
        "scope": 897,
        "src": "323:970:17"
      }
    ],
    "src": "0:1294:17"
  },
  "compiler": {
    "name": "solc",
    "version": "0.4.24+commit.e67f0147.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "2.0.1",
  "updatedAt": "2018-10-31T13:24:20.726Z"
}