token-price-oracles
Version:
tools for creating token price data feeds and oracles that integrate with on-chain dex's
11,126 lines • 515 kB
JSON
{
"contractName": "TimeMedianDataFeed",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "_date",
"type": "uint256"
}
],
"name": "dateHasResult",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "dataSource",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_index",
"type": "uint256"
}
],
"name": "resultByIndex",
"outputs": [
{
"name": "",
"type": "bytes32"
},
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "latestResult",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "latestResultDate",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_result",
"type": "bytes32"
},
{
"name": "_date",
"type": "uint256"
}
],
"name": "setResult",
"outputs": [
{
"name": "index",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_date",
"type": "uint256"
}
],
"name": "resultByDate",
"outputs": [
{
"name": "",
"type": "bytes32"
},
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalResults",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_dataSource",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_index",
"type": "uint256"
}
],
"name": "indexHasResult",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "_result",
"type": "bytes32"
},
{
"indexed": false,
"name": "_date",
"type": "uint256"
},
{
"indexed": false,
"name": "_index",
"type": "uint256"
},
{
"indexed": false,
"name": "_sender",
"type": "address"
}
],
"name": "ResultSet",
"type": "event"
},
{
"constant": true,
"inputs": [
{
"name": "startDate",
"type": "uint256"
},
{
"name": "endDate",
"type": "uint256"
}
],
"name": "medianizeByTimeframe",
"outputs": [
{
"name": "medianValue",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "startIndex",
"type": "uint256"
},
{
"name": "endIndex",
"type": "uint256"
}
],
"name": "medianizeByIndices",
"outputs": [
{
"name": "medianValue",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b5061141f806100206000396000f3006080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806307acc14b146100bf5780631a0ba4f2146101125780631b076edc1461015757806330adb55d146101ae5780636a2ea57e146101fe5780636e4aa4d01461023157806392549bf21461025c578063a25fa35c146102ab578063c0a6ab79146102fb578063c2605a6414610326578063c4d66de814610379578063dab21b63146103bc575b600080fd5b3480156100cb57600080fd5b506100f46004803603810190808035906020019092919080359060200190929190505050610401565b60405180826000191660001916815260200191505060405180910390f35b34801561011e57600080fd5b5061013d6004803603810190808035906020019092919050505061056c565b604051808215151515815260200191505060405180910390f35b34801561016357600080fd5b5061016c61058b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101ba57600080fd5b506101d9600480360381019080803590602001909291905050506105b1565b6040518083600019166000191681526020018281526020019250505060405180910390f35b34801561020a57600080fd5b50610213610681565b60405180826000191660001916815260200191505060405180910390f35b34801561023d57600080fd5b506102466106bc565b6040518082815260200191505060405180910390f35b34801561026857600080fd5b506102956004803603810190808035600019169060200190929190803590602001909291905050506106e4565b6040518082815260200191505060405180910390f35b3480156102b757600080fd5b506102d6600480360381019080803590602001909291905050506108a2565b6040518083600019166000191681526020018281526020019250505060405180910390f35b34801561030757600080fd5b50610310610953565b6040518082815260200191505060405180910390f35b34801561033257600080fd5b5061035b6004803603810190808035906020019092919080359060200190929190505050610963565b60405180826000191660001916815260200191505060405180910390f35b34801561038557600080fd5b506103ba600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c18565b005b3480156103c857600080fd5b506103e760048036038101908080359060200190929190505050610e70565b604051808215151515815260200191505060405180910390f35b60006060808385111515156104a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f7374617274496e646578206d757374206265206c657373207468616e206f722081526020017f657175616c20746f20656e64496e64657800000000000000000000000000000081525060400191505060405180910390fd5b600085111515610542576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f7374617274496e646578206d7573742062652067726561746572207468616e2081526020017f300000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61054c8585610ef8565b915061055782610fa4565b9050610562816111ec565b9250505092915050565b6000806035600084815260200190815260200160002054119050919050565b603660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806105bd83610e70565b1515610631576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4e6f20726573756c742073657420666f72205f696e646578000000000000000081525060200191505060405180910390fd5b6034600060338581548110151561064457fe5b906000526020600020015481526020019081526020016000205460338481548110151561066d57fe5b906000526020600020015491509150915091565b6000603460006033610691610953565b81548110151561069d57fe5b9060005260206000200154815260200190815260200160002054905090565b600060336106c8610953565b8154811015156106d457fe5b9060005260206000200154905090565b6000603660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f5468652063616c6c6572206973206e6f7420746865206461746120736f75726381526020017f650000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8142811115151561084a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446174652063616e6e6f7420626520696e20746865206675747572650000000081525060200191505060405180910390fd5b60006033805490501115610887576033610862610953565b81548110151561086e57fe5b90600052602060002001548311151561088657600080fd5b5b6108918484611238565b610899610953565b91505092915050565b6000806108ae8361056c565b1515610922576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4e6f20726573756c742073657420666f72205f6461746500000000000000000081525060200191505060405180910390fd5b6034600084815260200190815260200160002054603560008581526020019081526020016000205491509150915091565b6000600160338054905003905090565b60008060008060008587101515610a08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001807f737461727444617465206d757374206265206c657373207468616e20656e644481526020017f617465000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60016033805490500391505b600082118015610a245750600084145b15610a5d5785603383815481101515610a3957fe5b9060005260206000200154111515610a4f578193505b818060019003925050610a14565b600084111515610afb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f6461746573206f757473696465206f662072616e6765206f662064617461666581526020017f656420726573756c74730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b86603385815481101515610b0b57fe5b906000526020600020015410151515610bb2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f6461746573206f757473696465206f662072616e6765206f662064617461666581526020017f656420726573756c74730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8390505b60008110158015610bc75750600083145b15610c025786603382815481101515610bdc57fe5b90600052602060002001541015610bf4576001810192505b808060019003915050610bb6565b610c0c8385610401565b94505050505092915050565b60008060019054906101000a900460ff1680610c385750610c37611337565b5b80610c4f57506000809054906101000a900460ff16155b1515610ce9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff161590508015610d38576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610ddd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5f64617461536f757263652063616e6e6f74206265206164647265737328302981525060200191505060405180910390fd5b81603660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506033600090806001815401808255809150509060018203906000526020600020016000909192909190915055508015610e6c5760008060016101000a81548160ff0219169083151502179055505b5050565b60008082111515610ee9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f5f696e646578206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b81603380549050119050919050565b606060006060600080600187870301935083604051908082528060200260200182016040528015610f385781602001602082028038833980820191505090505b509250600091508690505b8581111515610f9757603381815481101515610f5b57fe5b90600052602060002001548383815181101515610f7457fe5b906020019060200201818152505081806001019250508080600101915050610f43565b8294505050505092915050565b60606000806000806000806000610fc660028a5161134890919063ffffffff16565b965060009550610fe160018a5161137290919063ffffffff16565b94505b848610156111dd576110126002611004878961139390919063ffffffff16565b61134890919063ffffffff16565b9350888481518110151561102257fe5b906020019060200201519250888581518110151561103c57fe5b90602001906020020151898581518110151561105457fe5b906020019060200201518a8681518110151561106c57fe5b9060200190602002018b8881518110151561108357fe5b906020019060200201828152508281525050508591508590505b84811015611149576110c689828151811015156110b657fe5b90602001906020020151846113b4565b1561113c5788818151811015156110d957fe5b9060200190602002015189838151811015156110f157fe5b906020019060200201518a8481518110151561110957fe5b9060200190602002018b8481518110151561112057fe5b9060200190602002018281525082815250505081806001019250505b808060010191505061109d565b888581518110151561115757fe5b90602001906020020151898381518110151561116f57fe5b906020019060200201518a8481518110151561118757fe5b9060200190602002018b8881518110151561119e57fe5b90602001906020020182815250828152505050868210156111d4576111cd60018361139390919063ffffffff16565b95506111d8565b8194505b610fe4565b88975050505050505050919050565b6000806000600284518115156111fe57fe5b049150838281518110151561120f57fe5b906020019060200201519050603460008281526020019081526020016000205492505050919050565b816034600083815260200190815260200160002081600019169055506033819080600181540180825580915050906001820390600052602060002001600090919290919091505550611288610953565b60356000838152602001908152602001600020819055506112a982826113ef565b7f441cd35745cc95136f39641bf16b52089bd7e481d97d7db059792befa3caec1982826112d4610953565b336040518085600019166000191681526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390a15050565b600080303b90506000811491505090565b60008060008311151561135a57600080fd5b828481151561136557fe5b0490508091505092915050565b60008083831115151561138457600080fd5b82840390508091505092915050565b60008082840190508381101515156113aa57600080fd5b8091505092915050565b600060346000838152602001908152602001600020546001900460346000858152602001908152602001600020546001900410905092915050565b50505600a165627a7a7230582064650bcf0215c803c0d3a0c9d8faf386243dc14985d521f1266d6f50726f76110029",
"deployedBytecode": "0x6080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806307acc14b146100bf5780631a0ba4f2146101125780631b076edc1461015757806330adb55d146101ae5780636a2ea57e146101fe5780636e4aa4d01461023157806392549bf21461025c578063a25fa35c146102ab578063c0a6ab79146102fb578063c2605a6414610326578063c4d66de814610379578063dab21b63146103bc575b600080fd5b3480156100cb57600080fd5b506100f46004803603810190808035906020019092919080359060200190929190505050610401565b60405180826000191660001916815260200191505060405180910390f35b34801561011e57600080fd5b5061013d6004803603810190808035906020019092919050505061056c565b604051808215151515815260200191505060405180910390f35b34801561016357600080fd5b5061016c61058b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101ba57600080fd5b506101d9600480360381019080803590602001909291905050506105b1565b6040518083600019166000191681526020018281526020019250505060405180910390f35b34801561020a57600080fd5b50610213610681565b60405180826000191660001916815260200191505060405180910390f35b34801561023d57600080fd5b506102466106bc565b6040518082815260200191505060405180910390f35b34801561026857600080fd5b506102956004803603810190808035600019169060200190929190803590602001909291905050506106e4565b6040518082815260200191505060405180910390f35b3480156102b757600080fd5b506102d6600480360381019080803590602001909291905050506108a2565b6040518083600019166000191681526020018281526020019250505060405180910390f35b34801561030757600080fd5b50610310610953565b6040518082815260200191505060405180910390f35b34801561033257600080fd5b5061035b6004803603810190808035906020019092919080359060200190929190505050610963565b60405180826000191660001916815260200191505060405180910390f35b34801561038557600080fd5b506103ba600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c18565b005b3480156103c857600080fd5b506103e760048036038101908080359060200190929190505050610e70565b604051808215151515815260200191505060405180910390f35b60006060808385111515156104a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f7374617274496e646578206d757374206265206c657373207468616e206f722081526020017f657175616c20746f20656e64496e64657800000000000000000000000000000081525060400191505060405180910390fd5b600085111515610542576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f7374617274496e646578206d7573742062652067726561746572207468616e2081526020017f300000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61054c8585610ef8565b915061055782610fa4565b9050610562816111ec565b9250505092915050565b6000806035600084815260200190815260200160002054119050919050565b603660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806105bd83610e70565b1515610631576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4e6f20726573756c742073657420666f72205f696e646578000000000000000081525060200191505060405180910390fd5b6034600060338581548110151561064457fe5b906000526020600020015481526020019081526020016000205460338481548110151561066d57fe5b906000526020600020015491509150915091565b6000603460006033610691610953565b81548110151561069d57fe5b9060005260206000200154815260200190815260200160002054905090565b600060336106c8610953565b8154811015156106d457fe5b9060005260206000200154905090565b6000603660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f5468652063616c6c6572206973206e6f7420746865206461746120736f75726381526020017f650000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8142811115151561084a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446174652063616e6e6f7420626520696e20746865206675747572650000000081525060200191505060405180910390fd5b60006033805490501115610887576033610862610953565b81548110151561086e57fe5b90600052602060002001548311151561088657600080fd5b5b6108918484611238565b610899610953565b91505092915050565b6000806108ae8361056c565b1515610922576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4e6f20726573756c742073657420666f72205f6461746500000000000000000081525060200191505060405180910390fd5b6034600084815260200190815260200160002054603560008581526020019081526020016000205491509150915091565b6000600160338054905003905090565b60008060008060008587101515610a08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001807f737461727444617465206d757374206265206c657373207468616e20656e644481526020017f617465000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60016033805490500391505b600082118015610a245750600084145b15610a5d5785603383815481101515610a3957fe5b9060005260206000200154111515610a4f578193505b818060019003925050610a14565b600084111515610afb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f6461746573206f757473696465206f662072616e6765206f662064617461666581526020017f656420726573756c74730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b86603385815481101515610b0b57fe5b906000526020600020015410151515610bb2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f6461746573206f757473696465206f662072616e6765206f662064617461666581526020017f656420726573756c74730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8390505b60008110158015610bc75750600083145b15610c025786603382815481101515610bdc57fe5b90600052602060002001541015610bf4576001810192505b808060019003915050610bb6565b610c0c8385610401565b94505050505092915050565b60008060019054906101000a900460ff1680610c385750610c37611337565b5b80610c4f57506000809054906101000a900460ff16155b1515610ce9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff161590508015610d38576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610ddd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5f64617461536f757263652063616e6e6f74206265206164647265737328302981525060200191505060405180910390fd5b81603660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506033600090806001815401808255809150509060018203906000526020600020016000909192909190915055508015610e6c5760008060016101000a81548160ff0219169083151502179055505b5050565b60008082111515610ee9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f5f696e646578206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b81603380549050119050919050565b606060006060600080600187870301935083604051908082528060200260200182016040528015610f385781602001602082028038833980820191505090505b509250600091508690505b8581111515610f9757603381815481101515610f5b57fe5b90600052602060002001548383815181101515610f7457fe5b906020019060200201818152505081806001019250508080600101915050610f43565b8294505050505092915050565b60606000806000806000806000610fc660028a5161134890919063ffffffff16565b965060009550610fe160018a5161137290919063ffffffff16565b94505b848610156111dd576110126002611004878961139390919063ffffffff16565b61134890919063ffffffff16565b9350888481518110151561102257fe5b906020019060200201519250888581518110151561103c57fe5b90602001906020020151898581518110151561105457fe5b906020019060200201518a8681518110151561106c57fe5b9060200190602002018b8881518110151561108357fe5b906020019060200201828152508281525050508591508590505b84811015611149576110c689828151811015156110b657fe5b90602001906020020151846113b4565b1561113c5788818151811015156110d957fe5b9060200190602002015189838151811015156110f157fe5b906020019060200201518a8481518110151561110957fe5b9060200190602002018b8481518110151561112057fe5b9060200190602002018281525082815250505081806001019250505b808060010191505061109d565b888581518110151561115757fe5b90602001906020020151898381518110151561116f57fe5b906020019060200201518a8481518110151561118757fe5b9060200190602002018b8881518110151561119e57fe5b90602001906020020182815250828152505050868210156111d4576111cd60018361139390919063ffffffff16565b95506111d8565b8194505b610fe4565b88975050505050505050919050565b6000806000600284518115156111fe57fe5b049150838281518110151561120f57fe5b906020019060200201519050603460008281526020019081526020016000205492505050919050565b816034600083815260200190815260200160002081600019169055506033819080600181540180825580915050906001820390600052602060002001600090919290919091505550611288610953565b60356000838152602001908152602001600020819055506112a982826113ef565b7f441cd35745cc95136f39641bf16b52089bd7e481d97d7db059792befa3caec1982826112d4610953565b336040518085600019166000191681526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390a15050565b600080303b90506000811491505090565b60008060008311151561135a57600080fd5b828481151561136557fe5b0490508091505092915050565b60008083831115151561138457600080fd5b82840390508091505092915050565b60008082840190508381101515156113aa57600080fd5b8091505092915050565b600060346000838152602001908152602001600020546001900460346000858152602001908152602001600020546001900410905092915050565b50505600a165627a7a7230582064650bcf0215c803c0d3a0c9d8faf386243dc14985d521f1266d6f50726f76110029",
"sourceMap": "153:3466:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;153:3466:0;;;;;;;",
"deployedSourceMap": "153:3466:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1161:484;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1161:484:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3824:109:7;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3824:109:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;460:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;460:25:7;;;;;;;;;;;;;;;;;;;;;;;;;;;2276:209;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2276:209:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3279:123;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3279:123:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3051:114;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3051:114:7;;;;;;;;;;;;;;;;;;;;;;;1575:290;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1575:290:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2722:203;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2722:203:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1947:90;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1947:90:7;;;;;;;;;;;;;;;;;;;;;;;235:922:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;235:922:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1138:238:7;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1138:238:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;3526:167;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3526:167:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1161:484:0;1254:19;1440:27;1514:30;1305:8;1291:10;:22;;1283:84;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1394:1;1381:10;:14;1373:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1470:38;1487:10;1499:8;1470:16;:38::i;:::-;1440:68;;1547:38;1571:13;1547:23;:38::i;:::-;1514:71;;1605:35;1623:16;1605:17;:35::i;:::-;1591:49;;1161:484;;;;;;:::o;3824:109:7:-;3883:4;3926:1;3903:13;:20;3917:5;3903:20;;;;;;;;;;;;:24;3896:31;;3824:109;;;:::o;460:25::-;;;;;;;;;;;;;:::o;2276:209::-;2336:7;2345;2369:22;2384:6;2369:14;:22::i;:::-;2361:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2435:13;:28;2449:5;2455:6;2449:13;;;;;;;;;;;;;;;;;;2435:28;;;;;;;;;;;;2465:5;2471:6;2465:13;;;;;;;;;;;;;;;;;;2427:52;;;;2276:209;;;:::o;3279:123::-;3334:7;3360:13;:36;3374:5;3380:14;:12;:14::i;:::-;3374:21;;;;;;;;;;;;;;;;;;3360:36;;;;;;;;;;;;3353:43;;3279:123;:::o;3051:114::-;3110:7;3137:5;3143:14;:12;:14::i;:::-;3137:21;;;;;;;;;;;;;;;;;;3129:30;;3051:114;:::o;1575:290::-;1697:13;942:10;;;;;;;;;;;928:24;;:10;:24;;;920:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1676:5;761:3;752:5;:12;;744:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1741:1;1726:5;:12;;;;:16;1722:77;;;1769:5;1775:14;:12;:14::i;:::-;1769:21;;;;;;;;;;;;;;;;;;1761:5;:29;1753:38;;;;;;;;1722:77;1805:26;1816:7;1825:5;1805:10;:26::i;:::-;1845:14;:12;:14::i;:::-;1838:21;;997:1;1575:290;;;;:::o;2722:203::-;2780:7;2789;2813:20;2827:5;2813:13;:20::i;:::-;2805:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2876:13;:20;2890:5;2876:20;;;;;;;;;;;;2898:13;:20;2912:5;2898:20;;;;;;;;;;;;2868:51;;;;2722:203;;;:::o;1947:90::-;1992:7;2030:1;2015:5;:12;;;;:16;2008:23;;1947:90;:::o;235:922:0:-;328:19;430:13;449:15;516:6;931;377:7;365:9;:19;357:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;540:1;525:5;:12;;;;:16;516:25;;511:165;547:1;543;:5;:22;;;;;564:1;552:8;:13;543:22;511:165;;;596:7;584:5;590:1;584:8;;;;;;;;;;;;;;;;;;:19;;580:90;;;626:1;615:12;;580:90;567:3;;;;;;;;511:165;;;740:1;729:8;:12;721:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;821:9;802:5;808:8;802:15;;;;;;;;;;;;;;;;;;:28;;794:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;940:8;931:17;;926:166;955:1;950;:6;;:25;;;;;974:1;960:10;:15;950:25;926:166;;;1005:9;994:5;1000:1;994:8;;;;;;;;;;;;;;;;;;:20;990:96;;;1043:1;1039;:5;1026:18;;990:96;977:3;;;;;;;;926:166;;;1112:40;1131:10;1143:8;1112:18;:40::i;:::-;1098:54;;235:922;;;;;;;;:::o;1138:238:7:-;601:19:9;496:12;;;;;;;;;;;:31;;;;512:15;:13;:15::i;:::-;496:31;:47;;;;532:11;;;;;;;;;;;531:12;496:47;488:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;624:12;;;;;;;;;;;623:13;601:35;;646:14;642:80;;;685:4;670:12;;:19;;;;;;;;;;;;;;;;;;711:4;697:11;;:18;;;;;;;;;;;;;;;;;;642:80;1236:1:7;1213:25;;:11;:25;;;;1205:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1295:11;1282:10;;:24;;;;;;;;;;;;;;;;;;1313:5;1324:1;1313:13;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;1313:13:7;;;;;;;;;;;;;;;;;;;;;;740:14:9;736:55;;;779:5;764:12;;:20;;;;;;;;;;;;;;;;;;736:55;1138:238:7;;:::o;3526:167::-;3587:4;3617:1;3608:6;:10;3600:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3681:6;3666:5;:12;;;;:21;3659:28;;3526:167;;;:::o;3113:339:0:-;3206:6;3222:11;3267:17;3311:10;3336:6;3260:1;3247:10;3236:8;:21;:25;3222:39;;3298:6;3287:18;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;3287:18:0;;;;3267:38;;3324:1;3311:14;;3345:10;3336:19;;3331:101;3362:8;3357:1;:13;;3331:101;;;3400:5;3406:1;3400:8;;;;;;;;;;;;;;;;;;3387:3;3391:5;3387:10;;;;;;;;;;;;;;;;;:21;;;;;3418:7;;;;;;;3372:3;;;;;;;3331:101;;;3444:3;3437:10;;3113:339;;;;;;;;:::o;2078:1031::-;2168:6;2184;2226:9;2245:10;2323:15;2373;2538;2575:6;2193:27;2218:1;2193:13;:20;:24;;:27;;;;:::i;:::-;2184:36;;2238:1;2226:13;;2258:27;2283:1;2258:13;:20;:24;;:27;;;;:::i;:::-;2245:40;;2292:786;2306:5;2299:4;:12;2292:786;;;2341:22;2361:1;2341:15;2350:5;2341:4;:8;;:15;;;;:::i;:::-;:19;;:22;;;;:::i;:::-;2323:40;;2391:13;2405:10;2391:25;;;;;;;;;;;;;;;;;;2373:43;;2480:13;2494:5;2480:20;;;;;;;;;;;;;;;;;;2502:13;2516:10;2502:25;;;;;;;;;;;;;;;;;;2428:13;2442:10;2428:25;;;;;;;;;;;;;;;;;2455:13;2469:5;2455:20;;;;;;;;;;;;;;;;;2427:101;;;;;;;;;;2556:4;2538:22;;2584:4;2575:13;;2570:263;2594:5;2590:1;:9;2570:263;;;2624:41;2636:13;2650:1;2636:16;;;;;;;;;;;;;;;;;;2654:10;2624:11;:41::i;:::-;2620:203;;;2734:13;2748:1;2734:16;;;;;;;;;;;;;;;;;;2752:13;2766:10;2752:25;;;;;;;;;;;;;;;;;;2686:13;2700:10;2686:25;;;;;;;;;;;;;;;;;2713:13;2727:1;2713:16;;;;;;;;;;;;;;;;;2685:93;;;;;;;;;;2796:12;;;;;;;2620:203;2601:3;;;;;;;2570:263;;;2896:13;2910:5;2896:20;;;;;;;;;;;;;;;;;;2918:13;2932:10;2918:25;;;;;;;;;;;;;;;;;;2844:13;2858:10;2844:25;;;;;;;;;;;;;;;;;2871:13;2885:5;2871:20;;;;;;;;;;;;;;;;;2843:101;;;;;;;;;;2971:1;2958:10;:14;2954:118;;;2995:17;3010:1;2995:10;:14;;:17;;;;:::i;:::-;2988:24;;2954:118;;;3051:10;3043:18;;2954:118;2292:786;;;3091:13;3084:20;;2078:1031;;;;;;;;;;:::o;1674:254::-;1757:19;1786:16;1834:15;1827:1;1805:12;:19;:23;;;;;;;;1786:42;;1853:12;1866:11;1853:25;;;;;;;;;;;;;;;;;;1834:44;;1898:13;:25;1912:10;1898:25;;;;;;;;;;;;1884:39;;1674:254;;;;;:::o;4102:277:7:-;4193:7;4170:13;:20;4184:5;4170:20;;;;;;;;;;;:30;;;;;;;4207:5;4218;4207:17;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;4207:17:7;;;;;;;;;;;;;;;;;;;;;;4254:14;:12;:14::i;:::-;4231:13;:20;4245:5;4231:20;;;;;;;;;;;:37;;;;4277:29;4291:7;4300:5;4277:13;:29::i;:::-;4320:53;4330:7;4339:5;4346:14;:12;:14::i;:::-;4362:10;4320:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4102:277;;:::o;881:467:9:-;928:4;1269:10;1314:7;1302:20;1296:26;;1342:1;1336:2;:7;1329:14;;881:467;;:::o;695:270:6:-;753:7;846:9;780:1;776;:5;768:14;;;;;;;;862:1;858;:5;;;;;;;;846:17;;959:1;952:8;;695:270;;;;;:::o;1078:131::-;1136:7;1172:9;1164:1;1159;:6;;1151:15;;;;;;;;1188:1;1184;:5;1172:17;;1203:1;1196:8;;1078:131;;;;;:::o;1272:::-;1330:7;1345:9;1361:1;1357;:5;1345:17;;1381:1;1376;:6;;1368:15;;;;;;;;1397:1;1390:8;;1272:131;;;;;:::o;3456:161:0:-;3536:4;3591:13;:20;3605:5;3591:20;;;;;;;;;;;;3586:26;;;3562:13;:20;3576:5;3562:20;;;;;;;;;;;;3557:26;;;:55;3550:62;;3456:161;;;;:::o;4470:104:7:-;;;:::o",
"source": "pragma solidity ^0.4.24;\n\nimport \"tidbit/contracts/DataFeedOracles/DataFeedOracleBase.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\n\ncontract TimeMedianDataFeed is DataFeedOracleBase {\n using SafeMath for uint;\n\n function medianizeByTimeframe(uint startDate, uint endDate)\n public\n view\n returns (bytes32 medianValue)\n {\n require(startDate < endDate, 'startDate must be less than endDate');\n uint endIndex;\n uint startIndex;\n\n // find end date within dates array\n for (uint i = dates.length - 1; i > 0 && endIndex == 0; i--) {\n if (dates[i] <= endDate) {\n endIndex = i; // ONLY dates before the end date\n }\n }\n\n // require endIndex is more than 0\n require(endIndex > 0, 'dates outside of range of datafeed results');\n require(dates[endIndex] >= startDate, 'dates outside of range of datafeed results');\n\n // find start date within dates array\n for (uint j = endIndex; j >= 0 && startIndex == 0; j--) {\n if (dates[j] < startDate) {\n startIndex = j + 1; // no dates before the startDate\n }\n }\n\n medianValue = medianizeByIndices(startIndex, endIndex);\n }\n\n function medianizeByIndices(uint startIndex, uint endIndex)\n public\n view\n returns (bytes32 medianValue)\n {\n require(startIndex <= endIndex, 'startIndex must be less than or equal to endIndex');\n require(startIndex > 0, 'startIndex must be greater than 0');\n\n uint[] memory selectedDates = _sliceDatesArray(startIndex, endIndex);\n uint[] memory partitionedDates = _partitionDatesByResult(selectedDates);\n medianValue = _medianizeByDates(partitionedDates);\n }\n\n // Internal Functions\n\n function _medianizeByDates(uint[] orderedDates)\n internal\n view\n returns (bytes32 medianValue)\n {\n uint middleIndex = orderedDates.length / 2;\n uint middleDate = orderedDates[middleIndex];\n medianValue = resultsByDate[middleDate];\n }\n\n /**\n * @dev To minimize complexity, return the higher of the two middle\n * checkpoints in even-sized arrays instead of the average.\n */\n function _partitionDatesByResult(uint[] selectedDates)\n internal\n view\n returns (uint[])\n {\n uint k = selectedDates.length.div(2);\n uint left = 0;\n uint right = selectedDates.length.sub(1);\n\n while (left < right) {\n uint pivotIndex = left.add(right).div(2);\n uint pivotValue = selectedDates[pivotIndex];\n\n (selectedDates[pivotIndex], selectedDates[right]) = (selectedDates[right], selectedDates[pivotIndex]);\n uint storeIndex = left;\n for (uint i = left; i < right; i++) {\n if (_isLessThan(selectedDates[i], pivotValue)) {\n (selectedDates[storeIndex], selectedDates[i]) = (selectedDates[i], selectedDates[storeIndex]);\n storeIndex++;\n }\n }\n\n (selectedDates[storeIndex], selectedDates[right]) = (selectedDates[right], selectedDates[storeIndex]);\n if (storeIndex < k) {\n left = storeIndex.add(1);\n } else {\n right = storeIndex;\n }\n }\n\n return selectedDates;\n }\n\n function _sliceDatesArray(uint startIndex, uint endIndex)\n internal\n view\n returns (uint[])\n {\n uint length = endIndex - startIndex + 1;\n uint[] memory arr = new uint[](length);\n uint index = 0;\n for (uint i = startIndex; i <= endIndex; i++) {\n arr[index] = dates[i];\n index++;\n }\n return arr;\n }\n\n function _isLessThan(uint date1, uint date2)\n internal\n view\n returns (bool)\n {\n return uint(resultsByDate[date1]) < uint(resultsByDate[date2]);\n }\n}\n",
"sourcePath": "/Users/mfcalvanese/dev/eth/token-price-oracles/contracts/DataFeeds/TimeMedianDataFeed.sol",
"ast": {
"absolutePath": "/Users/mfcalvanese/dev/eth/token-price-oracles/contracts/DataFeeds/TimeMedianDataFeed.sol",
"exportedSymbols": {
"TimeMedianDataFeed": [
414
]
},
"id": 415,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:0"
},
{
"absolutePath": "tidbit/contracts/DataFeedOracles/DataFeedOracleBase.sol",
"file": "tidbit/contracts/DataFeedOracles/DataFeedOracleBase.sol",
"id": 2,
"nodeType": "ImportDirective",
"scope": 415,
"sourceUnit": 1377,
"src": "26:65:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"file": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"id": 3,
"nodeType": "ImportDirective",
"scope": 415,
"sourceUnit": 1084,
"src": "92:59:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4,
"name": "DataFeedOracleBase",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1376,
"src": "184:18:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_DataFeedOracleBase_$1376",
"typeString": "contract DataFeedOracleBase"
}
},
"id": 5,
"nodeType": "InheritanceSpecifier",
"src": "184:18:0"
}
],
"contractDependencies": [
1376,
1426,
1489
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 414,
"linearizedBaseContracts": [
414,
1376,
1426,
1489
],
"name": "TimeMedianDataFeed",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 8,
"libraryName": {
"contractScope": null,
"id": 6,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1083,
"src": "213:8:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$1083",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "207:24:0",
"typeName": {
"id": 7,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "226:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"body": {
"id": 112,
"nodeType": "Block",
"src": "351:806:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 20,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 18,
"name": "startDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10,
"src": "365:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 19,
"name": "endDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12,
"src": "377:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "365:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "737461727444617465206d757374206265206c657373207468616e20656e6444617465",
"id": 21,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "386:37:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3d35cba571bdf1f2e3dbd9dfac50e9bcb083ea4b6e81c70f2473502dc8e1bbcf",
"typeString": "literal_string \"startDate must be less than endDate\""
},
"value": "startDate must be less than endDate"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3d35cba571bdf1f2e3dbd9dfac50e9bcb083ea4b6e81c70f2473502dc8e1bbcf",
"typeString": "literal_string \"startDate must be less than endDate\""
}
],
"id": 17,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
1507,
1508
],
"referencedDeclaration": 1508,
"src": "357:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 22,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "357:67:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 23,
"nodeType": "ExpressionStatement",
"src": "357:67:0"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 25,
"name": "endIndex",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "430:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "430:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 26,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "430:13:0"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 28,
"name": "startIndex",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "449:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 27,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "449:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 29,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "449:15:0"
},
{
"body": {
"id": 58,
"nodeType": "Block",
"src": "572:104:0",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 51,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 47,
"name": "dates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "584:5:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 49,
"indexExpression": {
"argumentTypes": null,
"id": 48,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 31,
"src": "590:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "584:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 50,
"name": "endDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12,
"src": "596:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "584:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 57,
"nodeType": "IfStatement",
"src": "580:90:0",
"trueBody": {
"id": 56,
"nodeType": "Block",
"src": "605:65:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 54,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 52,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "615:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 53,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 31,
"src": "626:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "615:12:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 55,
"nodeType": "ExpressionStatement",
"src": "615:12:0"
}
]
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 43,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 39,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 37,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 31,
"src": "543:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 38,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "547:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "543:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 42,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 40,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "552:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 41,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "564:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "552:13:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "543:22:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 59,
"initializationExpression": {
"assignments": [
31
],
"declarations": [
{
"constant": false,
"id": 31,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "516:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 30,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "516:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 36,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 35,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 32,
"name": "dates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "525:5:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 33,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "525:12:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 34,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "540:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "525:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "516:25:0"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 45,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "--",
"prefix": false,
"src": "567:3:0",
"subExpression": {
"argumentTypes": null,
"id": 44,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 31,
"src": "567:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 46,
"nodeType": "ExpressionStatement",
"src": "567:3:0"
},
"nodeType": "ForStatement",
"src": "511:165:0"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 63,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 61,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "729:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 62,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "740:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "729:12:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6461746573206f757473696465206f662072616e6765206f6620646174616665656420726573756c7473",
"id": 64,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "743:44:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4714be1915cae6d7fabc93bb28a2be0e1aa97e456d25ed207cb91ceed0583ed9",
"typeString": "literal_string \"dates outside of range of datafeed results\""
},
"value": "dates outside of range of datafeed results"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4714be1915cae6d7fabc93bb28a2be0e1aa97e456d25ed207cb91ceed0583ed9",
"typeString": "literal_string \"dates outside of range of datafeed results\""
}
],
"id": 60,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
1507,
1508
],
"referencedDeclaration": 1508,
"src": "721:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 65,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "721:67:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 66,
"nodeType": "ExpressionStatement",
"src": "721:67:0"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 72,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 68,
"name": "dates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "802:5:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 70,
"indexExpression": {
"argumentTypes": null,
"id": 69,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "808:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "802:15:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 71,
"name": "startDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10,
"src": "821:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "802:28:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6461746573206f757473696465206f662072616e6765206f6620646174616665656420726573756c7473",
"id": 73,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "832:44:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4714be1915cae6d7fabc93bb28a2be0e1aa97e456d25ed207cb91ceed0583ed9",
"typeString": "literal_string \"dates outside of range of datafeed results\""
},
"value": "dates outside of range of datafeed results"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4714be1915cae6d7fabc93bb28a2be0e1aa97e456d25ed207cb91ceed0583ed9",
"typeString": "literal_string \"dates outside of range of datafeed results\""
}
],
"id": 67,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
1507,
1508
],
"referencedDeclaration": 1508,
"src": "794:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 74,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "794:83:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 75,
"nodeType": "ExpressionStatement",
"src": "794:83:0"
},
{
"body": {
"id": 103,
"nodeType": "Block",
"src": "982:110:0",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 94,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 90,
"name": "dates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "994:5:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 92,
"indexExpression": {
"argumentTypes": null,
"id": 91,
"name": "j",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "1000:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "994:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 93,
"name": "startDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10,
"src": "1005:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "994:20:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 102,
"nodeType": "IfStatement",
"src": "990:96:0",
"trueBody": {
"id": 101,
"nodeType": "Block",
"src": "1016:70:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 99,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 95,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28,
"src": "1026:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 98,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 96,
"name": "j",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "1039:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 97,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1043:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "1039:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1026:18:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 100,
"nodeType": "ExpressionStatement",
"src": "1026:18:0"
}
]
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 86,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 82,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 80,
"name": "j",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "950:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 81,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "955:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "950:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 85,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 83,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28,
"src": "960:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 84,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "974:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "960:15:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "950:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 104,
"initializationExpression": {
"assignments": [
77
],
"declarations": [
{
"constant": false,
"id": 77,
"name": "j",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "931:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 76,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "931:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 79,
"initialValue": {
"argumentTypes": null,
"id": 78,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "940:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "931:17:0"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 88,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "--",
"prefix": false,
"src": "977:3:0",
"subExpression": {
"argumentTypes": null,
"id": 87,
"name": "j",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "977:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 89,
"nodeType": "ExpressionStatement",
"src": "977:3:0"
},
"nodeType": "ForStatement",
"src": "926:166:0"
},
{
"expression": {
"argumentTypes": null,
"id": 110,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 105,
"name": "medianValue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15,
"src": "1098:11:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 107,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28,
"src": "1131:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 108,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "1143:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 106,
"name": "medianizeByIndices",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 160,
"src": "1112:18:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
"typeString": "function (uint256,uint256) view returns (bytes32)"
}
},
"id": 109,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1112:40:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "1098:54:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 111,
"nodeType": "ExpressionStatement",
"src": "1098:54:0"
}
]
},
"documentation": null,
"id": 113,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "medianizeByTimeframe",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 13,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10,
"name": "startDate",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "265:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 9,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "265:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12,
"name": "endDate",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "281:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "281:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "264:30:0"
},
"payable": false,
"returnParameters": {
"id": 16,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15,
"name": "medianValue",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "328:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 14,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "328:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "327:21:0"
},
"scope": 414,
"src": "235:922:0",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 159,
"nodeType": "Block",
"src": "1277:368:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 125,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 123,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 115,
"src": "1291:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 124,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 117,
"src": "1305:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1291:22:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "7374617274496e646578206d757374206265206c657373207468616e206f7220657175616c20746f20656e64496e646578",
"id": 126,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1315:51:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6c498146dfd782d7a882a3ad884ea7724980a2e5772a32202dce47b0402b2e13",
"typeString": "literal_string \"startIndex must be less than or equal to endIndex\""
},
"value": "startIndex must be less than or equal to endIndex"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_6c498146dfd782d7a882a3ad884ea7724980a2e5772a32202dce47b0402b2e13",
"typeString": "literal_string \"startIndex must be less than or equal to endIndex\""
}
],
"id": 122,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
1507,
1508
],
"referencedDeclaration": 1508,
"src": "1283:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 127,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1283:84:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 128,
"nodeType": "ExpressionStatement",
"src": "1283:84:0"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 132,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 130,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 115,
"src": "1381:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 131,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1394:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1381:14:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "7374617274496e646578206d7573742062652067726561746572207468616e2030",
"id": 133,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1397:35:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c367263a43d627a25a2927a592b294e2f10b62b98029f8985a10b2d256d528cd",
"typeString": "literal_string \"startIndex must be greater than 0\""
},
"value": "startIndex must be greater than 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c367263a43d627a25a2927a592b294e2f10b62b98029f8985a10b2d256d528cd",
"typeString": "literal_string \"startIndex must be greater than 0\""
}
],
"id": 129,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
1507,
1508
],
"referencedDeclaration": 1508,
"src": "1373:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1373:60:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 135,
"nodeType": "ExpressionStatement",
"src": "1373:60:0"
},
{
"assignments": [
139
],
"declarations": [
{
"constant": false,
"id": 139,
"name": "selectedDates",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "1440:27:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 137,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1440:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 138,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1440:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 144,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 141,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 115,
"src": "1487:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 142,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 117,
"src": "1499:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 140,
"name": "_sliceDatesArray",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 391,
"src": "1470:16:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
"typeString": "function (uint256,uint256) view returns (uint256[] memory)"
}
},
"id": 143,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1470:38:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1440:68:0"
},
{
"assignments": [
148
],
"declarations": [
{
"constant": false,
"id": 148,
"name": "partitionedDates",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "1514:30:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 146,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1514:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 147,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1514:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 152,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 150,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 139,
"src": "1571:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
],
"id": 149,
"name": "_partitionDatesByResult",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 333,
"src": "1547:23:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
"typeString": "function (uint256[] memory) view returns (uint256[] memory)"
}
},
"id": 151,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1547:38:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1514:71:0"
},
{
"expression": {
"argumentTypes": null,
"id": 157,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 153,
"name": "medianValue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 120,
"src": "1591:11:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 155,
"name": "partitionedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 148,
"src": "1623:16:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
],
"id": 154,
"name": "_medianizeByDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 188,
"src": "1605:17:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (uint256[] memory) view returns (bytes32)"
}
},
"id": 156,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1605:35:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "1591:49:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 158,
"nodeType": "ExpressionStatement",
"src": "1591:49:0"
}
]
},
"documentation": null,
"id": 160,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "medianizeByIndices",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 118,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 115,
"name": "startIndex",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "1189:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 114,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1189:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 117,
"name": "endIndex",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "1206:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 116,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1206:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1188:32:0"
},
"payable": false,
"returnParameters": {
"id": 121,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 120,
"name": "medianValue",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "1254:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 119,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1254:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1253:21:0"
},
"scope": 414,
"src": "1161:484:0",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 187,
"nodeType": "Block",
"src": "1780:148:0",
"statements": [
{
"assignments": [
169
],
"declarations": [
{
"constant": false,
"id": 169,
"name": "middleIndex",
"nodeType": "VariableDeclaration",
"scope": 188,
"src": "1786:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 168,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1786:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 174,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 173,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 170,
"name": "orderedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 163,
"src": "1805:12:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 171,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1805:19:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 172,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1827:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "1805:23:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1786:42:0"
},
{
"assignments": [
176
],
"declarations": [
{
"constant": false,
"id": 176,
"name": "middleDate",
"nodeType": "VariableDeclaration",
"scope": 188,
"src": "1834:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 175,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1834:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 180,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 177,
"name": "orderedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 163,
"src": "1853:12:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 179,
"indexExpression": {
"argumentTypes": null,
"id": 178,
"name": "middleIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 169,
"src": "1866:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1853:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1834:44:0"
},
{
"expression": {
"argumentTypes": null,
"id": 185,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 181,
"name": "medianValue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 166,
"src": "1884:11:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 182,
"name": "resultsByDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "1898:13:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
}
},
"id": 184,
"indexExpression": {
"argumentTypes": null,
"id": 183,
"name": "middleDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 176,
"src": "1912:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1898:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "1884:39:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 186,
"nodeType": "ExpressionStatement",
"src": "1884:39:0"
}
]
},
"documentation": null,
"id": 188,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "_medianizeByDates",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 164,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 163,
"name": "orderedDates",
"nodeType": "VariableDeclaration",
"scope": 188,
"src": "1701:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 161,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1701:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 162,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1701:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1700:21:0"
},
"payable": false,
"returnParameters": {
"id": 167,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 166,
"name": "medianValue",
"nodeType": "VariableDeclaration",
"scope": 188,
"src": "1757:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 165,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1757:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1756:21:0"
},
"scope": 414,
"src": "1674:254:0",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 332,
"nodeType": "Block",
"src": "2178:931:0",
"statements": [
{
"assignments": [
198
],
"declarations": [
{
"constant": false,
"id": 198,
"name": "k",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2184:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 197,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2184:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 204,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "32",
"id": 202,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2218:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 199,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2193:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 200,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2193:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 201,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 1014,
"src": "2193:24:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 203,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2193:27:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2184:36:0"
},
{
"assignments": [
206
],
"declarations": [
{
"constant": false,
"id": 206,
"name": "left",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2226:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 205,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2226:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 208,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 207,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2238:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "2226:13:0"
},
{
"assignments": [
210
],
"declarations": [
{
"constant": false,
"id": 210,
"name": "right",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2245:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 209,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2245:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 216,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 214,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2283:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 211,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2258:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 212,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2258:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 213,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 1038,
"src": "2258:24:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 215,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2258:27:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2245:40:0"
},
{
"body": {
"id": 328,
"nodeType": "Block",
"src": "2313:765:0",
"statements": [
{
"assignments": [
221
],
"declarations": [
{
"constant": false,
"id": 221,
"name": "pivotIndex",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2323:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 220,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2323:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 229,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "32",
"id": 227,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2361:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 224,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2350:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 222,
"name": "left",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 206,
"src": "2341:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 223,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 1062,
"src": "2341:8:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 225,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2341:15:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 226,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 1014,
"src": "2341:19:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 228,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2341:22:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2323:40:0"
},
{
"assignments": [
231
],
"declarations": [
{
"constant": false,
"id": 231,
"name": "pivotValue",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2373:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 230,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2373:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 235,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 232,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2391:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 234,
"indexExpression": {
"argumentTypes": null,
"id": 233,
"name": "pivotIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 221,
"src": "2405:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2391:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2373:43:0"
},
{
"expression": {
"argumentTypes": null,
"id": 250,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 236,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2428:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 238,
"indexExpression": {
"argumentTypes": null,
"id": 237,
"name": "pivotIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 221,
"src": "2442:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2428:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 239,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2455:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 241,
"indexExpression": {
"argumentTypes": null,
"id": 240,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2469:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2455:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 242,
"isConstant": false,
"isInlineArray": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "TupleExpression",
"src": "2427:49:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 243,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2480:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 245,
"indexExpression": {
"argumentTypes": null,
"id": 244,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2494:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2480:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 246,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2502:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 248,
"indexExpression": {
"argumentTypes": null,
"id": 247,
"name": "pivotIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 221,
"src": "2516:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2502:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 249,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2479:49:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"src": "2427:101:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 251,
"nodeType": "ExpressionStatement",
"src": "2427:101:0"
},
{
"assignments": [
253
],
"declarations": [
{
"constant": false,
"id": 253,
"name": "storeIndex",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2538:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 252,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2538:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 255,
"initialValue": {
"argumentTypes": null,
"id": 254,
"name": "left",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 206,
"src": "2556:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2538:22:0"
},
{
"body": {
"id": 293,
"nodeType": "Block",
"src": "2606:227:0",
"statements": [
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 267,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2636:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 269,
"indexExpression": {
"argumentTypes": null,
"id": 268,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 257,
"src": "2650:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2636:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 270,
"name": "pivotValue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 231,
"src": "2654:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 266,
"name": "_isLessThan",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 413,
"src": "2624:11:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (uint256,uint256) view returns (bool)"
}
},
"id": 271,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2624:41:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 292,
"nodeType": "IfStatement",
"src": "2620:203:0",
"trueBody": {
"id": 291,
"nodeType": "Block",
"src": "2667:156:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 286,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 272,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2686:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 274,
"indexExpression": {
"argumentTypes": null,
"id": 273,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2700:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2686:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 275,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2713:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 277,
"indexExpression": {
"argumentTypes": null,
"id": 276,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 257,
"src": "2727:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2713:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 278,
"isConstant": false,
"isInlineArray": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "TupleExpression",
"src": "2685:45:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 279,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2734:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 281,
"indexExpression": {
"argumentTypes": null,
"id": 280,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 257,
"src": "2748:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2734:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 282,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2752:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 284,
"indexExpression": {
"argumentTypes": null,
"id": 283,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2766:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2752:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 285,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2733:45:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"src": "2685:93:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 287,
"nodeType": "ExpressionStatement",
"src": "2685:93:0"
},
{
"expression": {
"argumentTypes": null,
"id": 289,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "2796:12:0",
"subExpression": {
"argumentTypes": null,
"id": 288,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2796:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 290,
"nodeType": "ExpressionStatement",
"src": "2796:12:0"
}
]
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 262,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 260,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 257,
"src": "2590:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 261,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2594:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2590:9:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 294,
"initializationExpression": {
"assignments": [
257
],
"declarations": [
{
"constant": false,
"id": 257,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2575:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 256,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2575:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 259,
"initialValue": {
"argumentTypes": null,
"id": 258,
"name": "left",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 206,
"src": "2584:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2575:13:0"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 264,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "2601:3:0",
"subExpression": {
"argumentTypes": null,
"id": 263,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 257,
"src": "2601:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 265,
"nodeType": "ExpressionStatement",
"src": "2601:3:0"
},
"nodeType": "ForStatement",
"src": "2570:263:0"
},
{
"expression": {
"argumentTypes": null,
"id": 309,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 295,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2844:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 297,
"indexExpression": {
"argumentTypes": null,
"id": 296,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2858:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2844:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 298,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2871:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 300,
"indexExpression": {
"argumentTypes": null,
"id": 299,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2885:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2871:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 301,
"isConstant": false,
"isInlineArray": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "TupleExpression",
"src": "2843:49:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 302,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2896:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 304,
"indexExpression": {
"argumentTypes": null,
"id": 303,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2910:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2896:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 305,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2918:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 307,
"indexExpression": {
"argumentTypes": null,
"id": 306,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2932:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2918:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 308,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2895:49:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"src": "2843:101:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 310,
"nodeType": "ExpressionStatement",
"src": "2843:101:0"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 313,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 311,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2958:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 312,
"name": "k",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 198,
"src": "2971:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2958:14:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 326,
"nodeType": "Block",
"src": "3029:43:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 324,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 322,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "3043:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 323,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "3051:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3043:18:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 325,
"nodeType": "ExpressionStatement",
"src": "3043:18:0"
}
]
},
"id": 327,
"nodeType": "IfStatement",
"src": "2954:118:0",
"trueBody": {
"id": 321,
"nodeType": "Block",
"src": "2974:49:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 319,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 314,
"name": "left",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 206,
"src": "2988:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 317,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3010:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"expression": {
"argumentTypes": null,
"id": 315,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2995:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 316,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 1062,
"src": "2995:14:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 318,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2995:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2988:24:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 320,
"nodeType": "ExpressionStatement",
"src": "2988:24:0"
}
]
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 217,
"name": "left",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 206,
"src": "2299:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 218,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2306:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2299:12:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 329,
"nodeType": "WhileStatement",
"src": "2292:786:0"
},
{
"expression": {
"argumentTypes": null,
"id": 330,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "3091:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"functionReturnParameters": 196,
"id": 331,
"nodeType": "Return",
"src": "3084:20:0"
}
]
},
"documentation": "@dev To minimize complexity, return the higher of the two middle\n checkpoints in even-sized arrays instead of the average.",
"id": 333,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "_partitionDatesByResult",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 192,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 191,
"name": "selectedDates",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2111:20:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 189,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2111:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 190,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2111:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2110:22:0"
},
"payable": false,
"returnParameters": {
"id": 196,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 195,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2168:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 193,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2168:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 194,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2168:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2167:8:0"
},
"scope": 414,
"src": "2078:1031:0",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 390,
"nodeType": "Block",
"src": "3216:236:0",
"statements": [
{
"assignments": [
344
],
"declarations": [
{
"constant": false,
"id": 344,
"name": "length",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3222:11:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 343,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3222:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 350,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 349,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 347,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 345,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 337,
"src": "3236:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 346,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 335,
"src": "3247:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3236:21:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 348,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3260:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "3236:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3222:39:0"
},
{
"assignments": [
354
],
"declarations": [
{
"constant": false,
"id": 354,
"name": "arr",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3267:17:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 352,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3267:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 353,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3267:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 360,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 358,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 344,
"src": "3298:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 357,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "3287:10:0",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$",
"typeString": "function (uint256) pure returns (uint256[] memory)"
},
"typeName": {
"baseType": {
"id": 355,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3291:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 356,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3291:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
}
},
"id": 359,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3287:18:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory",
"typeString": "uint256[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3267:38:0"
},
{
"assignments": [
362
],
"declarations": [
{
"constant": false,
"id": 362,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3311:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 361,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3311:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 364,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 363,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3324:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "3311:14:0"
},
{
"body": {
"id": 386,
"nodeType": "Block",
"src": "3377:55:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 381,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 375,
"name": "arr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 354,
"src": "3387:3:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 377,
"indexExpression": {
"argumentTypes": null,
"id": 376,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 362,
"src": "3391:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3387:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 378,
"name": "dates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "3400:5:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 380,
"indexExpression": {
"argumentTypes": null,
"id": 379,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 366,
"src": "3406:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3400:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3387:21:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 382,
"nodeType": "ExpressionStatement",
"src": "3387:21:0"
},
{
"expression": {
"argumentTypes": null,
"id": 384,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "3418:7:0",
"subExpression": {
"argumentTypes": null,
"id": 383,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 362,
"src": "3418:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 385,
"nodeType": "ExpressionStatement",
"src": "3418:7:0"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 371,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 369,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 366,
"src": "3357:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 370,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 337,
"src": "3362:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3357:13:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 387,
"initializationExpression": {
"assignments": [
366
],
"declarations": [
{
"constant": false,
"id": 366,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3336:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 365,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3336:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 368,
"initialValue": {
"argumentTypes": null,
"id": 367,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 335,
"src": "3345:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3336:19:0"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 373,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "3372:3:0",
"subExpression": {
"argumentTypes": null,
"id": 372,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 366,
"src": "3372:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 374,
"nodeType": "ExpressionStatement",
"src": "3372:3:0"
},
"nodeType": "ForStatement",
"src": "3331:101:0"
},
{
"expression": {
"argumentTypes": null,
"id": 388,
"name": "arr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 354,
"src": "3444:3:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"functionReturnParameters": 342,
"id": 389,
"nodeType": "Return",
"src": "3437:10:0"
}
]
},
"documentation": null,
"id": 391,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "_sliceDatesArray",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 338,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 335,
"name": "startIndex",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3139:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 334,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3139:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 337,
"name": "endIndex",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3156:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 336,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3156:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3138:32:0"
},
"payable": false,
"returnParameters": {
"id": 342,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 341,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3206:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 339,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3206:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 340,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3206:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3205:8:0"
},
"scope": 414,
"src": "3113:339:0",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 412,
"nodeType": "Block",
"src": "3544:73:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 410,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 401,
"name": "resultsByDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "3562:13:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
}
},
"id": 403,
"indexExpression": {
"argumentTypes": null,
"id": 402,
"name": "date1",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 393,
"src": "3576:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3562:20:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 400,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3557:4:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": "uint"
},
"id": 404,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3557:26:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 406,
"name": "resultsByDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "3591:13:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
}
},
"id": 408,
"indexExpression": {
"argumentTypes": null,
"id": 407,
"name": "date2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 395,
"src": "3605:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3591:20:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 405,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3586:4:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": "uint"
},
"id": 409,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3586:26:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3557:55:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 399,
"id": 411,
"nodeType": "Return",
"src": "3550:62:0"
}
]
},
"documentation": null,
"id": 413,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "_isLessThan",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 396,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 393,
"name": "date1",
"nodeType": "VariableDeclaration",
"scope": 413,
"src": "3477:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 392,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3477:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 395,
"name": "date2",
"nodeType": "VariableDeclaration",
"scope": 413,
"src": "3489:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 394,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3489:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3476:24:0"
},
"payable": false,
"returnParameters": {
"id": 399,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 398,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 413,
"src": "3536:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 397,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3536:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3535:6:0"
},
"scope": 414,
"src": "3456:161:0",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 415,
"src": "153:3466:0"
}
],
"src": "0:3620:0"
},
"legacyAST": {
"absolutePath": "/Users/mfcalvanese/dev/eth/token-price-oracles/contracts/DataFeeds/TimeMedianDataFeed.sol",
"exportedSymbols": {
"TimeMedianDataFeed": [
414
]
},
"id": 415,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:0"
},
{
"absolutePath": "tidbit/contracts/DataFeedOracles/DataFeedOracleBase.sol",
"file": "tidbit/contracts/DataFeedOracles/DataFeedOracleBase.sol",
"id": 2,
"nodeType": "ImportDirective",
"scope": 415,
"sourceUnit": 1377,
"src": "26:65:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"file": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"id": 3,
"nodeType": "ImportDirective",
"scope": 415,
"sourceUnit": 1084,
"src": "92:59:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4,
"name": "DataFeedOracleBase",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1376,
"src": "184:18:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_DataFeedOracleBase_$1376",
"typeString": "contract DataFeedOracleBase"
}
},
"id": 5,
"nodeType": "InheritanceSpecifier",
"src": "184:18:0"
}
],
"contractDependencies": [
1376,
1426,
1489
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 414,
"linearizedBaseContracts": [
414,
1376,
1426,
1489
],
"name": "TimeMedianDataFeed",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 8,
"libraryName": {
"contractScope": null,
"id": 6,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1083,
"src": "213:8:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$1083",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "207:24:0",
"typeName": {
"id": 7,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "226:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"body": {
"id": 112,
"nodeType": "Block",
"src": "351:806:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 20,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 18,
"name": "startDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10,
"src": "365:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 19,
"name": "endDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12,
"src": "377:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "365:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "737461727444617465206d757374206265206c657373207468616e20656e6444617465",
"id": 21,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "386:37:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3d35cba571bdf1f2e3dbd9dfac50e9bcb083ea4b6e81c70f2473502dc8e1bbcf",
"typeString": "literal_string \"startDate must be less than endDate\""
},
"value": "startDate must be less than endDate"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3d35cba571bdf1f2e3dbd9dfac50e9bcb083ea4b6e81c70f2473502dc8e1bbcf",
"typeString": "literal_string \"startDate must be less than endDate\""
}
],
"id": 17,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
1507,
1508
],
"referencedDeclaration": 1508,
"src": "357:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 22,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "357:67:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 23,
"nodeType": "ExpressionStatement",
"src": "357:67:0"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 25,
"name": "endIndex",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "430:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "430:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 26,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "430:13:0"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 28,
"name": "startIndex",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "449:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 27,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "449:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 29,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "449:15:0"
},
{
"body": {
"id": 58,
"nodeType": "Block",
"src": "572:104:0",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 51,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 47,
"name": "dates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "584:5:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 49,
"indexExpression": {
"argumentTypes": null,
"id": 48,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 31,
"src": "590:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "584:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 50,
"name": "endDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12,
"src": "596:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "584:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 57,
"nodeType": "IfStatement",
"src": "580:90:0",
"trueBody": {
"id": 56,
"nodeType": "Block",
"src": "605:65:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 54,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 52,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "615:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 53,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 31,
"src": "626:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "615:12:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 55,
"nodeType": "ExpressionStatement",
"src": "615:12:0"
}
]
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 43,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 39,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 37,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 31,
"src": "543:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 38,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "547:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "543:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 42,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 40,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "552:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 41,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "564:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "552:13:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "543:22:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 59,
"initializationExpression": {
"assignments": [
31
],
"declarations": [
{
"constant": false,
"id": 31,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "516:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 30,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "516:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 36,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 35,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 32,
"name": "dates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "525:5:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 33,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "525:12:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 34,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "540:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "525:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "516:25:0"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 45,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "--",
"prefix": false,
"src": "567:3:0",
"subExpression": {
"argumentTypes": null,
"id": 44,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 31,
"src": "567:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 46,
"nodeType": "ExpressionStatement",
"src": "567:3:0"
},
"nodeType": "ForStatement",
"src": "511:165:0"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 63,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 61,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "729:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 62,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "740:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "729:12:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6461746573206f757473696465206f662072616e6765206f6620646174616665656420726573756c7473",
"id": 64,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "743:44:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4714be1915cae6d7fabc93bb28a2be0e1aa97e456d25ed207cb91ceed0583ed9",
"typeString": "literal_string \"dates outside of range of datafeed results\""
},
"value": "dates outside of range of datafeed results"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4714be1915cae6d7fabc93bb28a2be0e1aa97e456d25ed207cb91ceed0583ed9",
"typeString": "literal_string \"dates outside of range of datafeed results\""
}
],
"id": 60,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
1507,
1508
],
"referencedDeclaration": 1508,
"src": "721:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 65,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "721:67:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 66,
"nodeType": "ExpressionStatement",
"src": "721:67:0"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 72,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 68,
"name": "dates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "802:5:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 70,
"indexExpression": {
"argumentTypes": null,
"id": 69,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "808:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "802:15:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 71,
"name": "startDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10,
"src": "821:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "802:28:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6461746573206f757473696465206f662072616e6765206f6620646174616665656420726573756c7473",
"id": 73,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "832:44:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4714be1915cae6d7fabc93bb28a2be0e1aa97e456d25ed207cb91ceed0583ed9",
"typeString": "literal_string \"dates outside of range of datafeed results\""
},
"value": "dates outside of range of datafeed results"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4714be1915cae6d7fabc93bb28a2be0e1aa97e456d25ed207cb91ceed0583ed9",
"typeString": "literal_string \"dates outside of range of datafeed results\""
}
],
"id": 67,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
1507,
1508
],
"referencedDeclaration": 1508,
"src": "794:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 74,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "794:83:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 75,
"nodeType": "ExpressionStatement",
"src": "794:83:0"
},
{
"body": {
"id": 103,
"nodeType": "Block",
"src": "982:110:0",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 94,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 90,
"name": "dates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "994:5:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 92,
"indexExpression": {
"argumentTypes": null,
"id": 91,
"name": "j",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "1000:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "994:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 93,
"name": "startDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10,
"src": "1005:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "994:20:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 102,
"nodeType": "IfStatement",
"src": "990:96:0",
"trueBody": {
"id": 101,
"nodeType": "Block",
"src": "1016:70:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 99,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 95,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28,
"src": "1026:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 98,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 96,
"name": "j",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "1039:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 97,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1043:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "1039:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1026:18:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 100,
"nodeType": "ExpressionStatement",
"src": "1026:18:0"
}
]
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 86,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 82,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 80,
"name": "j",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "950:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 81,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "955:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "950:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 85,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 83,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28,
"src": "960:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 84,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "974:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "960:15:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "950:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 104,
"initializationExpression": {
"assignments": [
77
],
"declarations": [
{
"constant": false,
"id": 77,
"name": "j",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "931:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 76,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "931:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 79,
"initialValue": {
"argumentTypes": null,
"id": 78,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "940:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "931:17:0"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 88,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "--",
"prefix": false,
"src": "977:3:0",
"subExpression": {
"argumentTypes": null,
"id": 87,
"name": "j",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "977:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 89,
"nodeType": "ExpressionStatement",
"src": "977:3:0"
},
"nodeType": "ForStatement",
"src": "926:166:0"
},
{
"expression": {
"argumentTypes": null,
"id": 110,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 105,
"name": "medianValue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15,
"src": "1098:11:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 107,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28,
"src": "1131:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 108,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "1143:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 106,
"name": "medianizeByIndices",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 160,
"src": "1112:18:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
"typeString": "function (uint256,uint256) view returns (bytes32)"
}
},
"id": 109,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1112:40:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "1098:54:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 111,
"nodeType": "ExpressionStatement",
"src": "1098:54:0"
}
]
},
"documentation": null,
"id": 113,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "medianizeByTimeframe",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 13,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10,
"name": "startDate",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "265:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 9,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "265:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12,
"name": "endDate",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "281:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "281:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "264:30:0"
},
"payable": false,
"returnParameters": {
"id": 16,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15,
"name": "medianValue",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "328:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 14,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "328:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "327:21:0"
},
"scope": 414,
"src": "235:922:0",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 159,
"nodeType": "Block",
"src": "1277:368:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 125,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 123,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 115,
"src": "1291:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 124,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 117,
"src": "1305:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1291:22:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "7374617274496e646578206d757374206265206c657373207468616e206f7220657175616c20746f20656e64496e646578",
"id": 126,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1315:51:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6c498146dfd782d7a882a3ad884ea7724980a2e5772a32202dce47b0402b2e13",
"typeString": "literal_string \"startIndex must be less than or equal to endIndex\""
},
"value": "startIndex must be less than or equal to endIndex"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_6c498146dfd782d7a882a3ad884ea7724980a2e5772a32202dce47b0402b2e13",
"typeString": "literal_string \"startIndex must be less than or equal to endIndex\""
}
],
"id": 122,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
1507,
1508
],
"referencedDeclaration": 1508,
"src": "1283:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 127,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1283:84:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 128,
"nodeType": "ExpressionStatement",
"src": "1283:84:0"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 132,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 130,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 115,
"src": "1381:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 131,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1394:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1381:14:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "7374617274496e646578206d7573742062652067726561746572207468616e2030",
"id": 133,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1397:35:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c367263a43d627a25a2927a592b294e2f10b62b98029f8985a10b2d256d528cd",
"typeString": "literal_string \"startIndex must be greater than 0\""
},
"value": "startIndex must be greater than 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c367263a43d627a25a2927a592b294e2f10b62b98029f8985a10b2d256d528cd",
"typeString": "literal_string \"startIndex must be greater than 0\""
}
],
"id": 129,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
1507,
1508
],
"referencedDeclaration": 1508,
"src": "1373:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1373:60:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 135,
"nodeType": "ExpressionStatement",
"src": "1373:60:0"
},
{
"assignments": [
139
],
"declarations": [
{
"constant": false,
"id": 139,
"name": "selectedDates",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "1440:27:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 137,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1440:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 138,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1440:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 144,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 141,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 115,
"src": "1487:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 142,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 117,
"src": "1499:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 140,
"name": "_sliceDatesArray",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 391,
"src": "1470:16:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
"typeString": "function (uint256,uint256) view returns (uint256[] memory)"
}
},
"id": 143,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1470:38:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1440:68:0"
},
{
"assignments": [
148
],
"declarations": [
{
"constant": false,
"id": 148,
"name": "partitionedDates",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "1514:30:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 146,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1514:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 147,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1514:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 152,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 150,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 139,
"src": "1571:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
],
"id": 149,
"name": "_partitionDatesByResult",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 333,
"src": "1547:23:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
"typeString": "function (uint256[] memory) view returns (uint256[] memory)"
}
},
"id": 151,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1547:38:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1514:71:0"
},
{
"expression": {
"argumentTypes": null,
"id": 157,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 153,
"name": "medianValue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 120,
"src": "1591:11:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 155,
"name": "partitionedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 148,
"src": "1623:16:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
],
"id": 154,
"name": "_medianizeByDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 188,
"src": "1605:17:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (uint256[] memory) view returns (bytes32)"
}
},
"id": 156,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1605:35:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "1591:49:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 158,
"nodeType": "ExpressionStatement",
"src": "1591:49:0"
}
]
},
"documentation": null,
"id": 160,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "medianizeByIndices",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 118,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 115,
"name": "startIndex",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "1189:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 114,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1189:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 117,
"name": "endIndex",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "1206:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 116,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1206:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1188:32:0"
},
"payable": false,
"returnParameters": {
"id": 121,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 120,
"name": "medianValue",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "1254:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 119,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1254:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1253:21:0"
},
"scope": 414,
"src": "1161:484:0",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 187,
"nodeType": "Block",
"src": "1780:148:0",
"statements": [
{
"assignments": [
169
],
"declarations": [
{
"constant": false,
"id": 169,
"name": "middleIndex",
"nodeType": "VariableDeclaration",
"scope": 188,
"src": "1786:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 168,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1786:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 174,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 173,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 170,
"name": "orderedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 163,
"src": "1805:12:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 171,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1805:19:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 172,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1827:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "1805:23:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1786:42:0"
},
{
"assignments": [
176
],
"declarations": [
{
"constant": false,
"id": 176,
"name": "middleDate",
"nodeType": "VariableDeclaration",
"scope": 188,
"src": "1834:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 175,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1834:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 180,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 177,
"name": "orderedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 163,
"src": "1853:12:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 179,
"indexExpression": {
"argumentTypes": null,
"id": 178,
"name": "middleIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 169,
"src": "1866:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1853:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1834:44:0"
},
{
"expression": {
"argumentTypes": null,
"id": 185,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 181,
"name": "medianValue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 166,
"src": "1884:11:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 182,
"name": "resultsByDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "1898:13:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
}
},
"id": 184,
"indexExpression": {
"argumentTypes": null,
"id": 183,
"name": "middleDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 176,
"src": "1912:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1898:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "1884:39:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 186,
"nodeType": "ExpressionStatement",
"src": "1884:39:0"
}
]
},
"documentation": null,
"id": 188,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "_medianizeByDates",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 164,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 163,
"name": "orderedDates",
"nodeType": "VariableDeclaration",
"scope": 188,
"src": "1701:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 161,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1701:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 162,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1701:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1700:21:0"
},
"payable": false,
"returnParameters": {
"id": 167,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 166,
"name": "medianValue",
"nodeType": "VariableDeclaration",
"scope": 188,
"src": "1757:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 165,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1757:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1756:21:0"
},
"scope": 414,
"src": "1674:254:0",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 332,
"nodeType": "Block",
"src": "2178:931:0",
"statements": [
{
"assignments": [
198
],
"declarations": [
{
"constant": false,
"id": 198,
"name": "k",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2184:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 197,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2184:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 204,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "32",
"id": 202,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2218:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 199,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2193:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 200,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2193:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 201,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 1014,
"src": "2193:24:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 203,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2193:27:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2184:36:0"
},
{
"assignments": [
206
],
"declarations": [
{
"constant": false,
"id": 206,
"name": "left",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2226:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 205,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2226:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 208,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 207,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2238:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "2226:13:0"
},
{
"assignments": [
210
],
"declarations": [
{
"constant": false,
"id": 210,
"name": "right",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2245:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 209,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2245:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 216,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 214,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2283:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 211,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2258:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 212,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2258:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 213,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 1038,
"src": "2258:24:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 215,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2258:27:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2245:40:0"
},
{
"body": {
"id": 328,
"nodeType": "Block",
"src": "2313:765:0",
"statements": [
{
"assignments": [
221
],
"declarations": [
{
"constant": false,
"id": 221,
"name": "pivotIndex",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2323:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 220,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2323:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 229,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "32",
"id": 227,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2361:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 224,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2350:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 222,
"name": "left",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 206,
"src": "2341:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 223,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 1062,
"src": "2341:8:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 225,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2341:15:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 226,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 1014,
"src": "2341:19:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 228,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2341:22:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2323:40:0"
},
{
"assignments": [
231
],
"declarations": [
{
"constant": false,
"id": 231,
"name": "pivotValue",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2373:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 230,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2373:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 235,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 232,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2391:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 234,
"indexExpression": {
"argumentTypes": null,
"id": 233,
"name": "pivotIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 221,
"src": "2405:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2391:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2373:43:0"
},
{
"expression": {
"argumentTypes": null,
"id": 250,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 236,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2428:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 238,
"indexExpression": {
"argumentTypes": null,
"id": 237,
"name": "pivotIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 221,
"src": "2442:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2428:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 239,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2455:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 241,
"indexExpression": {
"argumentTypes": null,
"id": 240,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2469:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2455:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 242,
"isConstant": false,
"isInlineArray": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "TupleExpression",
"src": "2427:49:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 243,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2480:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 245,
"indexExpression": {
"argumentTypes": null,
"id": 244,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2494:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2480:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 246,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2502:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 248,
"indexExpression": {
"argumentTypes": null,
"id": 247,
"name": "pivotIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 221,
"src": "2516:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2502:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 249,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2479:49:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"src": "2427:101:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 251,
"nodeType": "ExpressionStatement",
"src": "2427:101:0"
},
{
"assignments": [
253
],
"declarations": [
{
"constant": false,
"id": 253,
"name": "storeIndex",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2538:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 252,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2538:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 255,
"initialValue": {
"argumentTypes": null,
"id": 254,
"name": "left",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 206,
"src": "2556:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2538:22:0"
},
{
"body": {
"id": 293,
"nodeType": "Block",
"src": "2606:227:0",
"statements": [
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 267,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2636:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 269,
"indexExpression": {
"argumentTypes": null,
"id": 268,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 257,
"src": "2650:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2636:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 270,
"name": "pivotValue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 231,
"src": "2654:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 266,
"name": "_isLessThan",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 413,
"src": "2624:11:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (uint256,uint256) view returns (bool)"
}
},
"id": 271,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2624:41:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 292,
"nodeType": "IfStatement",
"src": "2620:203:0",
"trueBody": {
"id": 291,
"nodeType": "Block",
"src": "2667:156:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 286,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 272,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2686:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 274,
"indexExpression": {
"argumentTypes": null,
"id": 273,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2700:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2686:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 275,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2713:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 277,
"indexExpression": {
"argumentTypes": null,
"id": 276,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 257,
"src": "2727:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2713:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 278,
"isConstant": false,
"isInlineArray": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "TupleExpression",
"src": "2685:45:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 279,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2734:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 281,
"indexExpression": {
"argumentTypes": null,
"id": 280,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 257,
"src": "2748:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2734:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 282,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2752:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 284,
"indexExpression": {
"argumentTypes": null,
"id": 283,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2766:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2752:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 285,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2733:45:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"src": "2685:93:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 287,
"nodeType": "ExpressionStatement",
"src": "2685:93:0"
},
{
"expression": {
"argumentTypes": null,
"id": 289,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "2796:12:0",
"subExpression": {
"argumentTypes": null,
"id": 288,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2796:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 290,
"nodeType": "ExpressionStatement",
"src": "2796:12:0"
}
]
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 262,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 260,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 257,
"src": "2590:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 261,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2594:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2590:9:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 294,
"initializationExpression": {
"assignments": [
257
],
"declarations": [
{
"constant": false,
"id": 257,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2575:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 256,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2575:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 259,
"initialValue": {
"argumentTypes": null,
"id": 258,
"name": "left",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 206,
"src": "2584:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2575:13:0"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 264,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "2601:3:0",
"subExpression": {
"argumentTypes": null,
"id": 263,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 257,
"src": "2601:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 265,
"nodeType": "ExpressionStatement",
"src": "2601:3:0"
},
"nodeType": "ForStatement",
"src": "2570:263:0"
},
{
"expression": {
"argumentTypes": null,
"id": 309,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 295,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2844:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 297,
"indexExpression": {
"argumentTypes": null,
"id": 296,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2858:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2844:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 298,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2871:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 300,
"indexExpression": {
"argumentTypes": null,
"id": 299,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2885:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2871:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 301,
"isConstant": false,
"isInlineArray": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "TupleExpression",
"src": "2843:49:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 302,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2896:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 304,
"indexExpression": {
"argumentTypes": null,
"id": 303,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2910:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2896:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 305,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2918:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 307,
"indexExpression": {
"argumentTypes": null,
"id": 306,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2932:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2918:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 308,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2895:49:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"src": "2843:101:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 310,
"nodeType": "ExpressionStatement",
"src": "2843:101:0"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 313,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 311,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2958:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 312,
"name": "k",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 198,
"src": "2971:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2958:14:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 326,
"nodeType": "Block",
"src": "3029:43:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 324,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 322,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "3043:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 323,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "3051:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3043:18:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 325,
"nodeType": "ExpressionStatement",
"src": "3043:18:0"
}
]
},
"id": 327,
"nodeType": "IfStatement",
"src": "2954:118:0",
"trueBody": {
"id": 321,
"nodeType": "Block",
"src": "2974:49:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 319,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 314,
"name": "left",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 206,
"src": "2988:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 317,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3010:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"expression": {
"argumentTypes": null,
"id": 315,
"name": "storeIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "2995:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 316,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 1062,
"src": "2995:14:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 318,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2995:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2988:24:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 320,
"nodeType": "ExpressionStatement",
"src": "2988:24:0"
}
]
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 217,
"name": "left",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 206,
"src": "2299:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 218,
"name": "right",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "2306:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2299:12:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 329,
"nodeType": "WhileStatement",
"src": "2292:786:0"
},
{
"expression": {
"argumentTypes": null,
"id": 330,
"name": "selectedDates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "3091:13:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"functionReturnParameters": 196,
"id": 331,
"nodeType": "Return",
"src": "3084:20:0"
}
]
},
"documentation": "@dev To minimize complexity, return the higher of the two middle\n checkpoints in even-sized arrays instead of the average.",
"id": 333,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "_partitionDatesByResult",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 192,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 191,
"name": "selectedDates",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2111:20:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 189,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2111:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 190,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2111:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2110:22:0"
},
"payable": false,
"returnParameters": {
"id": 196,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 195,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "2168:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 193,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2168:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 194,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2168:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2167:8:0"
},
"scope": 414,
"src": "2078:1031:0",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 390,
"nodeType": "Block",
"src": "3216:236:0",
"statements": [
{
"assignments": [
344
],
"declarations": [
{
"constant": false,
"id": 344,
"name": "length",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3222:11:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 343,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3222:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 350,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 349,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 347,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 345,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 337,
"src": "3236:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 346,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 335,
"src": "3247:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3236:21:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 348,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3260:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "3236:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3222:39:0"
},
{
"assignments": [
354
],
"declarations": [
{
"constant": false,
"id": 354,
"name": "arr",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3267:17:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 352,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3267:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 353,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3267:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 360,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 358,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 344,
"src": "3298:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 357,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "3287:10:0",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$",
"typeString": "function (uint256) pure returns (uint256[] memory)"
},
"typeName": {
"baseType": {
"id": 355,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3291:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 356,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3291:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
}
},
"id": 359,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3287:18:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory",
"typeString": "uint256[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3267:38:0"
},
{
"assignments": [
362
],
"declarations": [
{
"constant": false,
"id": 362,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3311:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 361,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3311:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 364,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 363,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3324:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "3311:14:0"
},
{
"body": {
"id": 386,
"nodeType": "Block",
"src": "3377:55:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 381,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 375,
"name": "arr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 354,
"src": "3387:3:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 377,
"indexExpression": {
"argumentTypes": null,
"id": 376,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 362,
"src": "3391:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3387:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 378,
"name": "dates",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "3400:5:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 380,
"indexExpression": {
"argumentTypes": null,
"id": 379,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 366,
"src": "3406:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3400:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3387:21:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 382,
"nodeType": "ExpressionStatement",
"src": "3387:21:0"
},
{
"expression": {
"argumentTypes": null,
"id": 384,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "3418:7:0",
"subExpression": {
"argumentTypes": null,
"id": 383,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 362,
"src": "3418:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 385,
"nodeType": "ExpressionStatement",
"src": "3418:7:0"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 371,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 369,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 366,
"src": "3357:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 370,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 337,
"src": "3362:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3357:13:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 387,
"initializationExpression": {
"assignments": [
366
],
"declarations": [
{
"constant": false,
"id": 366,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3336:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 365,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3336:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 368,
"initialValue": {
"argumentTypes": null,
"id": 367,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 335,
"src": "3345:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3336:19:0"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 373,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "3372:3:0",
"subExpression": {
"argumentTypes": null,
"id": 372,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 366,
"src": "3372:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 374,
"nodeType": "ExpressionStatement",
"src": "3372:3:0"
},
"nodeType": "ForStatement",
"src": "3331:101:0"
},
{
"expression": {
"argumentTypes": null,
"id": 388,
"name": "arr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 354,
"src": "3444:3:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"functionReturnParameters": 342,
"id": 389,
"nodeType": "Return",
"src": "3437:10:0"
}
]
},
"documentation": null,
"id": 391,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "_sliceDatesArray",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 338,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 335,
"name": "startIndex",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3139:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 334,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3139:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 337,
"name": "endIndex",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3156:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 336,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3156:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3138:32:0"
},
"payable": false,
"returnParameters": {
"id": 342,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 341,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "3206:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 339,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3206:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 340,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3206:6:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3205:8:0"
},
"scope": 414,
"src": "3113:339:0",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 412,
"nodeType": "Block",
"src": "3544:73:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 410,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 401,
"name": "resultsByDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "3562:13:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
}
},
"id": 403,
"indexExpression": {
"argumentTypes": null,
"id": 402,
"name": "date1",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 393,
"src": "3576:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3562:20:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 400,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3557:4:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": "uint"
},
"id": 404,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3557:26:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 406,
"name": "resultsByDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "3591:13:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
}
},
"id": 408,
"indexExpression": {
"argumentTypes": null,
"id": 407,
"name": "date2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 395,
"src": "3605:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3591:20:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 405,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3586:4:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": "uint"
},
"id": 409,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3586:26:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3557:55:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 399,
"id": 411,
"nodeType": "Return",
"src": "3550:62:0"
}
]
},
"documentation": null,
"id": 413,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "_isLessThan",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 396,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 393,
"name": "date1",
"nodeType": "VariableDeclaration",
"scope": 413,
"src": "3477:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 392,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3477:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 395,
"name": "date2",
"nodeType": "VariableDeclaration",
"scope": 413,
"src": "3489:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 394,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3489:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3476:24:0"
},
"payable": false,
"returnParameters": {
"id": 399,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 398,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 413,
"src": "3536:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 397,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3536:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3535:6:0"
},
"scope": 414,
"src": "3456:161:0",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 415,
"src": "153:3466:0"
}
],
"src": "0:3620:0"
},
"compiler": {
"name": "solc",
"version": "0.4.25+commit.59dbf8f1.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.2",
"updatedAt": "2019-07-23T19:08:33.527Z"
}