@levelk/token-price-oracles
Version:
tools for creating token price data feeds and oracles that integrate with on-chain dex's
606 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": "0x608060405234801561001057600080fd5b5061141f806100206000396000f3006080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806307acc14b146100bf5780631a0ba4f2146101125780631b076edc1461015757806330adb55d146101ae5780636a2ea57e146101fe5780636e4aa4d01461023157806392549bf21461025c578063a25fa35c146102ab578063c0a6ab79146102fb578063c2605a6414610326578063c4d66de814610379578063dab21b63146103bc575b600080fd5b3480156100cb57600080fd5b506100f46004803603810190808035906020019092919080359060200190929190505050610401565b60405180826000191660001916815260200191505060405180910390f35b34801561011e57600080fd5b5061013d6004803603810190808035906020019092919050505061056c565b604051808215151515815260200191505060405180910390f35b34801561016357600080fd5b5061016c61058b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101ba57600080fd5b506101d9600480360381019080803590602001909291905050506105b1565b6040518083600019166000191681526020018281526020019250505060405180910390f35b34801561020a57600080fd5b50610213610681565b60405180826000191660001916815260200191505060405180910390f35b34801561023d57600080fd5b506102466106bc565b6040518082815260200191505060405180910390f35b34801561026857600080fd5b506102956004803603810190808035600019169060200190929190803590602001909291905050506106e4565b6040518082815260200191505060405180910390f35b3480156102b757600080fd5b506102d6600480360381019080803590602001909291905050506108a2565b6040518083600019166000191681526020018281526020019250505060405180910390f35b34801561030757600080fd5b50610310610953565b6040518082815260200191505060405180910390f35b34801561033257600080fd5b5061035b6004803603810190808035906020019092919080359060200190929190505050610963565b60405180826000191660001916815260200191505060405180910390f35b34801561038557600080fd5b506103ba600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c18565b005b3480156103c857600080fd5b506103e760048036038101908080359060200190929190505050610e70565b604051808215151515815260200191505060405180910390f35b60006060808385111515156104a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f7374617274496e646578206d757374206265206c657373207468616e206f722081526020017f657175616c20746f20656e64496e64657800000000000000000000000000000081525060400191505060405180910390fd5b600085111515610542576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f7374617274496e646578206d7573742062652067726561746572207468616e2081526020017f300000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61054c8585610ef8565b915061055782610fa4565b9050610562816111ec565b9250505092915050565b6000806035600084815260200190815260200160002054119050919050565b603660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806105bd83610e70565b1515610631576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4e6f20726573756c742073657420666f72205f696e646578000000000000000081525060200191505060405180910390fd5b6034600060338581548110151561064457fe5b906000526020600020015481526020019081526020016000205460338481548110151561066d57fe5b906000526020600020015491509150915091565b6000603460006033610691610953565b81548110151561069d57fe5b9060005260206000200154815260200190815260200160002054905090565b600060336106c8610953565b8154811015156106d457fe5b9060005260206000200154905090565b6000603660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f5468652063616c6c6572206973206e6f7420746865206461746120736f75726381526020017f650000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8142811115151561084a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446174652063616e6e6f7420626520696e20746865206675747572650000000081525060200191505060405180910390fd5b60006033805490501115610887576033610862610953565b81548110151561086e57fe5b90600052602060002001548311151561088657600080fd5b5b6108918484611238565b610899610953565b91505092915050565b6000806108ae8361056c565b1515610922576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4e6f20726573756c742073657420666f72205f6461746500000000000000000081525060200191505060405180910390fd5b6034600084815260200190815260200160002054603560008581526020019081526020016000205491509150915091565b6000600160338054905003905090565b60008060008060008587101515610a08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001807f737461727444617465206d757374206265206c657373207468616e20656e644481526020017f617465000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60016033805490500391505b600082118015610a245750600084145b15610a5d5785603383815481101515610a3957fe5b9060005260206000200154111515610a4f578193505b818060019003925050610a14565b600084111515610afb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f6461746573206f757473696465206f662072616e6765206f662064617461666581526020017f656420726573756c74730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b86603385815481101515610b0b57fe5b906000526020600020015410151515610bb2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f6461746573206f757473696465206f662072616e6765206f662064617461666581526020017f656420726573756c74730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8390505b60008110158015610bc75750600083145b15610c025786603382815481101515610bdc57fe5b90600052602060002001541015610bf4576001810192505b808060019003915050610bb6565b610c0c8385610401565b94505050505092915050565b60008060019054906101000a900460ff1680610c385750610c37611337565b5b80610c4f57506000809054906101000a900460ff16155b1515610ce9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff161590508015610d38576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610ddd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5f64617461536f757263652063616e6e6f74206265206164647265737328302981525060200191505060405180910390fd5b81603660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506033600090806001815401808255809150509060018203906000526020600020016000909192909190915055508015610e6c5760008060016101000a81548160ff0219169083151502179055505b5050565b60008082111515610ee9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f5f696e646578206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b81603380549050119050919050565b606060006060600080600187870301935083604051908082528060200260200182016040528015610f385781602001602082028038833980820191505090505b509250600091508690505b8581111515610f9757603381815481101515610f5b57fe5b90600052602060002001548383815181101515610f7457fe5b906020019060200201818152505081806001019250508080600101915050610f43565b8294505050505092915050565b60606000806000806000806000610fc660028a5161134890919063ffffffff16565b965060009550610fe160018a5161137290919063ffffffff16565b94505b848610156111dd576110126002611004878961139390919063ffffffff16565b61134890919063ffffffff16565b9350888481518110151561102257fe5b906020019060200201519250888581518110151561103c57fe5b90602001906020020151898581518110151561105457fe5b906020019060200201518a8681518110151561106c57fe5b9060200190602002018b8881518110151561108357fe5b906020019060200201828152508281525050508591508590505b84811015611149576110c689828151811015156110b657fe5b90602001906020020151846113b4565b1561113c5788818151811015156110d957fe5b9060200190602002015189838151811015156110f157fe5b906020019060200201518a8481518110151561110957fe5b9060200190602002018b8481518110151561112057fe5b9060200190602002018281525082815250505081806001019250505b808060010191505061109d565b888581518110151561115757fe5b90602001906020020151898381518110151561116f57fe5b906020019060200201518a8481518110151561118757fe5b9060200190602002018b8881518110151561119e57fe5b90602001906020020182815250828152505050868210156111d4576111cd60018361139390919063ffffffff16565b95506111d8565b8194505b610fe4565b88975050505050505050919050565b6000806000600284518115156111fe57fe5b049150838281518110151561120f57fe5b906020019060200201519050603460008281526020019081526020016000205492505050919050565b816034600083815260200190815260200160002081600019169055506033819080600181540180825580915050906001820390600052602060002001600090919290919091505550611288610953565b60356000838152602001908152602001600020819055506112a982826113ef565b7f441cd35745cc95136f39641bf16b52089bd7e481d97d7db059792befa3caec1982826112d4610953565b336040518085600019166000191681526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390a15050565b600080303b90506000811491505090565b60008060008311151561135a57600080fd5b828481151561136557fe5b0490508091505092915050565b60008083831115151561138457600080fd5b82840390508091505092915050565b60008082840190508381101515156113aa57600080fd5b8091505092915050565b600060346000838152602001908152602001600020546001900460346000858152602001908152602001600020546001900410905092915050565b50505600a165627a7a72305820a56da499000e898840db212e38a6918572c15552bd1870e76f42447a7f2ba93d0029",
"deployedBytecode": "0x6080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806307acc14b146100bf5780631a0ba4f2146101125780631b076edc1461015757806330adb55d146101ae5780636a2ea57e146101fe5780636e4aa4d01461023157806392549bf21461025c578063a25fa35c146102ab578063c0a6ab79146102fb578063c2605a6414610326578063c4d66de814610379578063dab21b63146103bc575b600080fd5b3480156100cb57600080fd5b506100f46004803603810190808035906020019092919080359060200190929190505050610401565b60405180826000191660001916815260200191505060405180910390f35b34801561011e57600080fd5b5061013d6004803603810190808035906020019092919050505061056c565b604051808215151515815260200191505060405180910390f35b34801561016357600080fd5b5061016c61058b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101ba57600080fd5b506101d9600480360381019080803590602001909291905050506105b1565b6040518083600019166000191681526020018281526020019250505060405180910390f35b34801561020a57600080fd5b50610213610681565b60405180826000191660001916815260200191505060405180910390f35b34801561023d57600080fd5b506102466106bc565b6040518082815260200191505060405180910390f35b34801561026857600080fd5b506102956004803603810190808035600019169060200190929190803590602001909291905050506106e4565b6040518082815260200191505060405180910390f35b3480156102b757600080fd5b506102d6600480360381019080803590602001909291905050506108a2565b6040518083600019166000191681526020018281526020019250505060405180910390f35b34801561030757600080fd5b50610310610953565b6040518082815260200191505060405180910390f35b34801561033257600080fd5b5061035b6004803603810190808035906020019092919080359060200190929190505050610963565b60405180826000191660001916815260200191505060405180910390f35b34801561038557600080fd5b506103ba600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c18565b005b3480156103c857600080fd5b506103e760048036038101908080359060200190929190505050610e70565b604051808215151515815260200191505060405180910390f35b60006060808385111515156104a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f7374617274496e646578206d757374206265206c657373207468616e206f722081526020017f657175616c20746f20656e64496e64657800000000000000000000000000000081525060400191505060405180910390fd5b600085111515610542576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f7374617274496e646578206d7573742062652067726561746572207468616e2081526020017f300000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61054c8585610ef8565b915061055782610fa4565b9050610562816111ec565b9250505092915050565b6000806035600084815260200190815260200160002054119050919050565b603660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806105bd83610e70565b1515610631576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4e6f20726573756c742073657420666f72205f696e646578000000000000000081525060200191505060405180910390fd5b6034600060338581548110151561064457fe5b906000526020600020015481526020019081526020016000205460338481548110151561066d57fe5b906000526020600020015491509150915091565b6000603460006033610691610953565b81548110151561069d57fe5b9060005260206000200154815260200190815260200160002054905090565b600060336106c8610953565b8154811015156106d457fe5b9060005260206000200154905090565b6000603660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f5468652063616c6c6572206973206e6f7420746865206461746120736f75726381526020017f650000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8142811115151561084a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446174652063616e6e6f7420626520696e20746865206675747572650000000081525060200191505060405180910390fd5b60006033805490501115610887576033610862610953565b81548110151561086e57fe5b90600052602060002001548311151561088657600080fd5b5b6108918484611238565b610899610953565b91505092915050565b6000806108ae8361056c565b1515610922576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4e6f20726573756c742073657420666f72205f6461746500000000000000000081525060200191505060405180910390fd5b6034600084815260200190815260200160002054603560008581526020019081526020016000205491509150915091565b6000600160338054905003905090565b60008060008060008587101515610a08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001807f737461727444617465206d757374206265206c657373207468616e20656e644481526020017f617465000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60016033805490500391505b600082118015610a245750600084145b15610a5d5785603383815481101515610a3957fe5b9060005260206000200154111515610a4f578193505b818060019003925050610a14565b600084111515610afb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f6461746573206f757473696465206f662072616e6765206f662064617461666581526020017f656420726573756c74730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b86603385815481101515610b0b57fe5b906000526020600020015410151515610bb2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f6461746573206f757473696465206f662072616e6765206f662064617461666581526020017f656420726573756c74730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8390505b60008110158015610bc75750600083145b15610c025786603382815481101515610bdc57fe5b90600052602060002001541015610bf4576001810192505b808060019003915050610bb6565b610c0c8385610401565b94505050505092915050565b60008060019054906101000a900460ff1680610c385750610c37611337565b5b80610c4f57506000809054906101000a900460ff16155b1515610ce9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff161590508015610d38576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610ddd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5f64617461536f757263652063616e6e6f74206265206164647265737328302981525060200191505060405180910390fd5b81603660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506033600090806001815401808255809150509060018203906000526020600020016000909192909190915055508015610e6c5760008060016101000a81548160ff0219169083151502179055505b5050565b60008082111515610ee9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f5f696e646578206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b81603380549050119050919050565b606060006060600080600187870301935083604051908082528060200260200182016040528015610f385781602001602082028038833980820191505090505b509250600091508690505b8581111515610f9757603381815481101515610f5b57fe5b90600052602060002001548383815181101515610f7457fe5b906020019060200201818152505081806001019250508080600101915050610f43565b8294505050505092915050565b60606000806000806000806000610fc660028a5161134890919063ffffffff16565b965060009550610fe160018a5161137290919063ffffffff16565b94505b848610156111dd576110126002611004878961139390919063ffffffff16565b61134890919063ffffffff16565b9350888481518110151561102257fe5b906020019060200201519250888581518110151561103c57fe5b90602001906020020151898581518110151561105457fe5b906020019060200201518a8681518110151561106c57fe5b9060200190602002018b8881518110151561108357fe5b906020019060200201828152508281525050508591508590505b84811015611149576110c689828151811015156110b657fe5b90602001906020020151846113b4565b1561113c5788818151811015156110d957fe5b9060200190602002015189838151811015156110f157fe5b906020019060200201518a8481518110151561110957fe5b9060200190602002018b8481518110151561112057fe5b9060200190602002018281525082815250505081806001019250505b808060010191505061109d565b888581518110151561115757fe5b90602001906020020151898381518110151561116f57fe5b906020019060200201518a8481518110151561118757fe5b9060200190602002018b8881518110151561119e57fe5b90602001906020020182815250828152505050868210156111d4576111cd60018361139390919063ffffffff16565b95506111d8565b8194505b610fe4565b88975050505050505050919050565b6000806000600284518115156111fe57fe5b049150838281518110151561120f57fe5b906020019060200201519050603460008281526020019081526020016000205492505050919050565b816034600083815260200190815260200160002081600019169055506033819080600181540180825580915050906001820390600052602060002001600090919290919091505550611288610953565b60356000838152602001908152602001600020819055506112a982826113ef565b7f441cd35745cc95136f39641bf16b52089bd7e481d97d7db059792befa3caec1982826112d4610953565b336040518085600019166000191681526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390a15050565b600080303b90506000811491505090565b60008060008311151561135a57600080fd5b828481151561136557fe5b0490508091505092915050565b60008083831115151561138457600080fd5b82840390508091505092915050565b60008082840190508381101515156113aa57600080fd5b8091505092915050565b600060346000838152602001908152602001600020546001900460346000858152602001908152602001600020546001900410905092915050565b50505600a165627a7a72305820a56da499000e898840db212e38a6918572c15552bd1870e76f42447a7f2ba93d0029",
"sourceMap": "129:3468:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;129:3468:0;;;;;;;",
"deployedSourceMap": "129:3468:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1139:484;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1139:484:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3824:109:10;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3824:109:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;460:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;460:25:10;;;;;;;;;;;;;;;;;;;;;;;;;;;2276:209;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2276:209:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3279:123;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3279:123:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3051:114;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3051:114:10;;;;;;;;;;;;;;;;;;;;;;;1575:290;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1575:290:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2722:203;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2722:203:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1947:90;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1947:90:10;;;;;;;;;;;;;;;;;;;;;;;213:922:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;213:922:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1138:238:10;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1138:238:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;3526:167;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3526:167:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1139:484:0;1232:19;1418:27;1492:30;1283:8;1269:10;:22;;1261:84;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1372:1;1359:10;:14;1351:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1448:38;1465:10;1477:8;1448:16;:38::i;:::-;1418:68;;1525:38;1549:13;1525:23;:38::i;:::-;1492:71;;1583:35;1601:16;1583:17;:35::i;:::-;1569:49;;1139:484;;;;;;:::o;3824:109:10:-;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;213:922:0:-;306:19;408:13;427:15;494:6;909;355:7;343:9;:19;335:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;518:1;503:5;:12;;;;:16;494:25;;489:165;525:1;521;:5;:22;;;;;542:1;530:8;:13;521:22;489:165;;;574:7;562:5;568:1;562:8;;;;;;;;;;;;;;;;;;:19;;558:90;;;604:1;593:12;;558:90;545:3;;;;;;;;489:165;;;718:1;707:8;:12;699:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;799:9;780:5;786:8;780:15;;;;;;;;;;;;;;;;;;:28;;772:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;918:8;909:17;;904:166;933:1;928;:6;;:25;;;;;952:1;938:10;:15;928:25;904:166;;;983:9;972:5;978:1;972:8;;;;;;;;;;;;;;;;;;:20;968:96;;;1021:1;1017;:5;1004:18;;968:96;955:3;;;;;;;;904:166;;;1090:40;1109:10;1121:8;1090:18;:40::i;:::-;1076:54;;213:922;;;;;;;;:::o;1138:238:10:-;601:19:12;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:10;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:10;;;;;;;;;;;;;;;;;;;;;;740:14:12;736:55;;;779:5;764:12;;:20;;;;;;;;;;;;;;;;;;736:55;1138:238:10;;:::o;3526:167::-;3587:4;3617:1;3608:6;:10;3600:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3681:6;3666:5;:12;;;;:21;3659:28;;3526:167;;;:::o;3091:339:0:-;3184:6;3200:11;3245:17;3289:10;3314:6;3238:1;3225:10;3214:8;:21;:25;3200:39;;3276:6;3265: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;3265:18:0;;;;3245:38;;3302:1;3289:14;;3323:10;3314:19;;3309:101;3340:8;3335:1;:13;;3309:101;;;3378:5;3384:1;3378:8;;;;;;;;;;;;;;;;;;3365:3;3369:5;3365:10;;;;;;;;;;;;;;;;;:21;;;;;3396:7;;;;;;;3350:3;;;;;;;3309:101;;;3422:3;3415:10;;3091:339;;;;;;;;:::o;2056:1031::-;2146:6;2162;2204:9;2223:10;2301:15;2351;2516;2553:6;2171:27;2196:1;2171:13;:20;:24;;:27;;;;:::i;:::-;2162:36;;2216:1;2204:13;;2236:27;2261:1;2236:13;:20;:24;;:27;;;;:::i;:::-;2223:40;;2270:786;2284:5;2277:4;:12;2270:786;;;2319:22;2339:1;2319:15;2328:5;2319:4;:8;;:15;;;;:::i;:::-;:19;;:22;;;;:::i;:::-;2301:40;;2369:13;2383:10;2369:25;;;;;;;;;;;;;;;;;;2351:43;;2458:13;2472:5;2458:20;;;;;;;;;;;;;;;;;;2480:13;2494:10;2480:25;;;;;;;;;;;;;;;;;;2406:13;2420:10;2406:25;;;;;;;;;;;;;;;;;2433:13;2447:5;2433:20;;;;;;;;;;;;;;;;;2405:101;;;;;;;;;;2534:4;2516:22;;2562:4;2553:13;;2548:263;2572:5;2568:1;:9;2548:263;;;2602:41;2614:13;2628:1;2614:16;;;;;;;;;;;;;;;;;;2632:10;2602:11;:41::i;:::-;2598:203;;;2712:13;2726:1;2712:16;;;;;;;;;;;;;;;;;;2730:13;2744:10;2730:25;;;;;;;;;;;;;;;;;;2664:13;2678:10;2664:25;;;;;;;;;;;;;;;;;2691:13;2705:1;2691:16;;;;;;;;;;;;;;;;;2663:93;;;;;;;;;;2774:12;;;;;;;2598:203;2579:3;;;;;;;2548:263;;;2874:13;2888:5;2874:20;;;;;;;;;;;;;;;;;;2896:13;2910:10;2896:25;;;;;;;;;;;;;;;;;;2822:13;2836:10;2822:25;;;;;;;;;;;;;;;;;2849:13;2863:5;2849:20;;;;;;;;;;;;;;;;;2821:101;;;;;;;;;;2949:1;2936:10;:14;2932:118;;;2973:17;2988:1;2973:10;:14;;:17;;;;:::i;:::-;2966:24;;2932:118;;;3029:10;3021:18;;2932:118;2270:786;;;3069:13;3062:20;;2056:1031;;;;;;;;;;:::o;1652:254::-;1735:19;1764:16;1812:15;1805:1;1783:12;:19;:23;;;;;;;;1764:42;;1831:12;1844:11;1831:25;;;;;;;;;;;;;;;;;;1812:44;;1876:13;:25;1890:10;1876:25;;;;;;;;;;;;1862:39;;1652:254;;;;;:::o;4102:277:10:-;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:10;;;;;;;;;;;;;;;;;;;;;;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:12:-;928:4;1269:10;1314:7;1302:20;1296:26;;1342:1;1336:2;:7;1329:14;;881:467;;:::o;699:270:8:-;757:7;850:9;784:1;780;:5;772:14;;;;;;;;866:1;862;:5;;;;;;;;850:17;;963:1;956:8;;699:270;;;;;:::o;1082:131::-;1140:7;1176:9;1168:1;1163;:6;;1155:15;;;;;;;;1192:1;1188;:5;1176:17;;1207:1;1200:8;;1082:131;;;;;:::o;1276:::-;1334:7;1349:9;1365:1;1361;:5;1349:17;;1385:1;1380;:6;;1372:15;;;;;;;;1401:1;1394:8;;1276:131;;;;;:::o;3434:161:0:-;3514:4;3569:13;:20;3583:5;3569:20;;;;;;;;;;;;3564:26;;;3540:13;:20;3554:5;3540:20;;;;;;;;;;;;3535:26;;;:55;3528:62;;3434:161;;;;:::o;4470:104:10:-;;;:::o",
"source": "pragma solidity ^0.4.24;\n\nimport \"@levelk/tidbit/contracts/DataFeedOracles/DataFeedOracleBase.sol\";\nimport \"../TPSafeMath.sol\";\n\ncontract TimeMedianDataFeed is DataFeedOracleBase {\n using TPSafeMath 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": "@levelk/tidbit/contracts/DataFeedOracles/DataFeedOracleBase.sol",
"file": "@levelk/tidbit/contracts/DataFeedOracles/DataFeedOracleBase.sol",
"id": 2,
"nodeType": "ImportDirective",
"scope": 415,
"sourceUnit": 1650,
"src": "26:73:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/mfcalvanese/dev/eth/token-price-oracles/contracts/TPSafeMath.sol",
"file": "../TPSafeMath.sol",
"id": 3,
"nodeType": "ImportDirective",
"scope": 415,
"sourceUnit": 1261,
"src": "100:27:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4,
"name": "DataFeedOracleBase",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1649,
"src": "160:18:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_DataFeedOracleBase_$1649",
"typeString": "contract DataFeedOracleBase"
}
},
"id": 5,
"nodeType": "InheritanceSpecifier",
"src": "160:18:0"
}
],
"contractDependencies": [
1649,
1699,
1762
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 414,
"linearizedBaseContracts": [
414,
1649,
1699,
1762
],
"name": "TimeMedianDataFeed",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 8,
"libraryName": {
"contractScope": null,
"id": 6,
"name": "TPSafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1260,
"src": "189:10:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TPSafeMath_$1260",
"typeString": "library TPSafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "183:26:0",
"typeName": {
"id": 7,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "204:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"body": {
"id": 112,
"nodeType": "Block",
"src": "329: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": "343:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 19,
"name": "endDate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12,
"src": "355:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "343: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": "364: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": [
1780,
1781
],
"referencedDeclaration": 1781,
"src": "335: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": "335:67:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 23,
"nodeType": "ExpressionStatement",
"src": "335:67:0"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 25,
"name": "endIndex",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "408:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "408:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 26,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "408:13:0"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 28,
"name": "startIndex",
"nodeType": "VariableDeclaration",
"scope": 113,
"src": "427:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 27,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "427:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 29,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "427:15:0"
},
{
"body": {
"id": 58,
"nodeType": "Block",
"src": "550: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": 1367,
"src": "562: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": "568:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure":