packages/sdk/etc/RoundsManager.json
{
"contractName": "RoundsManager",
"abi": [
{
"constant": true,
"inputs": [],
"name": "lastRoundLengthUpdateRound",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "lipUpgradeRound",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "targetContractId",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "lastRoundLengthUpdateStartBlock",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "lastInitializedRound",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "roundLength",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "_controller",
"type": "address"
}
],
"name": "setController",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "roundLockAmount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "controller",
"outputs": [
{
"internalType": "contract IController",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_controller",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "round",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "blockHash",
"type": "bytes32"
}
],
"name": "NewRound",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "controller",
"type": "address"
}
],
"name": "SetController",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "param",
"type": "string"
}
],
"name": "ParameterUpdate",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "_roundLength",
"type": "uint256"
}
],
"name": "setRoundLength",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "_roundLockAmount",
"type": "uint256"
}
],
"name": "setRoundLockAmount",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "initializeRound",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "_lip",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_round",
"type": "uint256"
}
],
"name": "setLIPUpgradeRound",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "blockNum",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "uint256",
"name": "_block",
"type": "uint256"
}
],
"name": "blockHash",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "uint256",
"name": "_round",
"type": "uint256"
}
],
"name": "blockHashForRound",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "currentRound",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "currentRoundStartBlock",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "currentRoundInitialized",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "currentRoundLocked",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.11+commit.22be8592\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roundLockAmount\",\"type\":\"uint256\"}],\"name\":\"setRoundLockAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastRoundLengthUpdateRound\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_lip\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"setLIPUpgradeRound\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lipUpgradeRound\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentRoundInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"blockHashForRound\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"targetContractId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastRoundLengthUpdateStartBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roundLength\",\"type\":\"uint256\"}],\"name\":\"setRoundLength\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentRoundLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"blockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastInitializedRound\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentRound\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blockNum\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"roundLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentRoundStartBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"name\":\"setController\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"initializeRound\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"roundLockAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IController\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"name\":\"NewRound\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"}],\"name\":\"SetController\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"param\",\"type\":\"string\"}],\"name\":\"ParameterUpdate\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"blockHashForRound(uint256)\":{\"params\":{\"_round\":\"Round number\"},\"return\":\"Blockhash for `_round`\"},\"constructor\":{\"details\":\"This constructor will not initialize any state variables besides `controller`. The following setter functions should be used to initialize state variables post-deployment: - setRoundLength() - setRoundLockAmount()\",\"params\":{\"_controller\":\"Address of Controller that this contract will be registered with\"}},\"setController(address)\":{\"params\":{\"_controller\":\"Controller contract address\"}},\"setLIPUpgradeRound(uint256,uint256)\":{\"params\":{\"_lip\":\"the LIP number.\",\"_round\":\"(optional) the round in which the LIP becomes active\"}},\"setRoundLength(uint256)\":{\"params\":{\"_roundLength\":\"Round length in blocks\"}},\"setRoundLockAmount(uint256)\":{\"params\":{\"_roundLockAmount\":\"Round lock amount as a % of the number of blocks in a round\"}}},\"title\":\"RoundsManager\"},\"userdoc\":{\"methods\":{\"blockHash(uint256)\":{\"notice\":\"Return blockhash for a block\"},\"blockHashForRound(uint256)\":{\"notice\":\"Return blockhash for a round\"},\"blockNum()\":{\"notice\":\"Return current block number\"},\"constructor\":\"RoundsManager constructor. Only invokes constructor of base Manager contract with provided Controller address\",\"currentRound()\":{\"notice\":\"Return current round\"},\"currentRoundInitialized()\":{\"notice\":\"Check if current round is initialized\"},\"currentRoundLocked()\":{\"notice\":\"Check if we are in the lock period of the current round\"},\"currentRoundStartBlock()\":{\"notice\":\"Return start block of current round\"},\"initializeRound()\":{\"notice\":\"Initialize the current round. Called once at the start of any round\"},\"setController(address)\":{\"notice\":\"Set controller. Only callable by current controller\"},\"setLIPUpgradeRound(uint256,uint256)\":{\"notice\":\"setLIPUpgradeRound sets the round an LIP upgrade would become active.\"},\"setRoundLength(uint256)\":{\"notice\":\"Set round length. Only callable by the controller owner\"},\"setRoundLockAmount(uint256)\":{\"notice\":\"Set round lock amount. Only callable by the controller owner\"}},\"notice\":\"Manages round progression and other blockchain time related operations of the Livepeer protocol\"}},\"settings\":{\"compilationTarget\":{\"/Users/nico/Desktop/livepeer/protocol/contracts/rounds/RoundsManager.sol\":\"RoundsManager\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/nico/Desktop/livepeer/protocol/contracts/IController.sol\":{\"keccak256\":\"0x9adbd65c8c04e6560850baecea4d2bcb816a82bee97d4e868e7ac4f1a13c388f\",\"urls\":[\"bzz-raw://492ada9418cf14f8bfc9641d4d91a94ec61c90f747d8fc5bc08a2c0691afda36\",\"dweb:/ipfs/QmSQNQgYt9RDZm2GuFr5bA9YANvZJyBXdwiZmCSBx3Ahwj\"]},\"/Users/nico/Desktop/livepeer/protocol/contracts/IManager.sol\":{\"keccak256\":\"0x5073a1e33e686649a383f41c1e6881b853e398722d122ff342677f1de908779a\",\"urls\":[\"bzz-raw://a74e705061ffd37adaa9fefaee5df8907c882d98b3f35934cf85527101965dfa\",\"dweb:/ipfs/QmTsoK8YgN11ShRJcRUwQKQutVfkintPhwu5ugk2uzrxDr\"]},\"/Users/nico/Desktop/livepeer/protocol/contracts/Manager.sol\":{\"keccak256\":\"0xbcc2d3adc4a499e104716aa86cbfff109b2c804f51cf347263038eba9c7b3c2c\",\"urls\":[\"bzz-raw://1380c745c68933c1b8ef64aedca4d5784c22b826c9af5be7347fde2cf9d1f701\",\"dweb:/ipfs/QmWM8YjQqMDEBmtxiTNcGesNbjqFiqr2T6rcBphDFcdzst\"]},\"/Users/nico/Desktop/livepeer/protocol/contracts/ManagerProxyTarget.sol\":{\"keccak256\":\"0x3a5544b0993099263010faaf7fcb15980d3af7ba27a1e5a148ca1eacbaf36f8c\",\"urls\":[\"bzz-raw://de965244928d695b4e8973a217063366de3367770914bcc910debb2e24bbb47c\",\"dweb:/ipfs/QmXZp9ZwNvgfrne3B6m6SaV9sysjX4TMBy7iVCcxtsKUpE\"]},\"/Users/nico/Desktop/livepeer/protocol/contracts/bonding/IBondingManager.sol\":{\"keccak256\":\"0x965d053b8e8a62cec34e614622c2e402cf45310463891b54f82b148e1bc3ffa5\",\"urls\":[\"bzz-raw://59c3bc4a3d53ef19237eeb730aa2aca3500c95cb5af9bb4db55ee827110d5ea9\",\"dweb:/ipfs/QmeUbuYYa5RnvtxzJZsSM2FWf6zDevBUzAmmPFPWiCwmsG\"]},\"/Users/nico/Desktop/livepeer/protocol/contracts/libraries/MathUtils.sol\":{\"keccak256\":\"0x57d08f96087b23c0d8ab0dc13350903bf10dd1ca19e4847375fc20933714e15f\",\"urls\":[\"bzz-raw://6630fa65e4cdea12f291d49fb1ca4658be232dd197af30b61ea5e5b08df114f0\",\"dweb:/ipfs/QmRb6vJKEVBvjbSHyE7jwmqUzZwh7boTaUqLM5PKfqyQNu\"]},\"/Users/nico/Desktop/livepeer/protocol/contracts/rounds/IRoundsManager.sol\":{\"keccak256\":\"0xbd1cc9e34ddc013ca74ab3bf4a8ca0921420e92c62b391bf16f2d282c92cd008\",\"urls\":[\"bzz-raw://6e841b3aa34853c3e3c6da02eecfd9ab3056ca659bd1c0c68ffa2ab2627ca015\",\"dweb:/ipfs/QmadmjdcHk9nC8UmXJJC8DmNgCqqptfhFSiBmb1bka4eVT\"]},\"/Users/nico/Desktop/livepeer/protocol/contracts/rounds/RoundsManager.sol\":{\"keccak256\":\"0x3941e4863d9c7be9c69d0fe25d3ce236ec47d65c96b3947e3b28470ddee482fc\",\"urls\":[\"bzz-raw://21988bc4aac2d8624e2b8ec9e45172011d6d6667d16f2d317db40fa22f707094\",\"dweb:/ipfs/QmfGp7CoyX8FdYYJmDvxMhAgjVYdy17uwEoBQ6kpLwZska\"]},\"/Users/nico/Desktop/livepeer/protocol/contracts/token/IMinter.sol\":{\"keccak256\":\"0x6afdbd66d9fc733ce1c7f59d903e0c3f414d8552aae6fc1ed38b9560578cd6c6\",\"urls\":[\"bzz-raw://267526bcc3b9c8ad38a9e9087a7acbfa017e5bd483a25ac92d0f4bd84be0af20\",\"dweb:/ipfs/QmaADX2xBFysMjPmLFKfFHV1ZLsUxrPdJhCmU78gw1rPfb\"]},\"/Users/nico/Desktop/livepeer/protocol/contracts/zeppelin/Ownable.sol\":{\"keccak256\":\"0x94fcbac59dd1323e3535e5fdce0184d5e2a09384bf1cf58f2e607a99e91fafd4\",\"urls\":[\"bzz-raw://48dc435a4509d27cfd5f2ece29695440ba348dc2ca1d7fa22ec482842f68750e\",\"dweb:/ipfs/QmWthSxDUiuRQCTK9ktxknha95xVpfqR5eawYycda1FCDi\"]},\"/Users/nico/Desktop/livepeer/protocol/contracts/zeppelin/Pausable.sol\":{\"keccak256\":\"0x18accd93f505a4304382d7db24704803dbd0b6ff3e1b8cf19ea85133695c5372\",\"urls\":[\"bzz-raw://f8410315d13dcc02c5479de0e8543a9fb812493e09e1ceebd2e878fdf399f28d\",\"dweb:/ipfs/QmPw4tVsUH7qXgThu7RAPBM5NZyE3zB9aobbdCqWWtCPJa\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzz-raw://d62d769b2219d5de39013093412623e624fa887f871826ea3bae6052ee893610\",\"dweb:/ipfs/QmV3yVktya1s617QmuzQR2CfuJgUi3dR2xEZY9ecmqZ2G1\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50604051610fd3380380610fd38339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610f6e806100656000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806385df51fd116100ad5780638fa148f2116100715780638fa148f21461025557806392eefe9b1461025d578063d4807fb214610283578063f5b490d51461028b578063f77c4791146102935761012c565b806385df51fd146102185780638807f36e146102355780638a19c8bc1461023d5780638ae63d6d146102455780638b649b941461024d5761012c565b80633aa4add4116100f45780633aa4add4146101c657806351720b41146101e3578063668abff7146101eb578063681312f5146101f35780636841f253146102105761012c565b80630b1573b8146101315780630fe1dfa81461015057806313013e7a1461016a5780631e6d4c221461018d578063219bc76c146101aa575b600080fd5b61014e6004803603602081101561014757600080fd5b50356102b7565b005b61015861042a565b60408051918252519081900360200190f35b61014e6004803603604081101561018057600080fd5b5080359060200135610430565b610158600480360360208110156101a357600080fd5b5035610578565b6101b261058a565b604080519115158252519081900360200190f35b610158600480360360208110156101dc57600080fd5b503561059d565b6101586105af565b6101586105b5565b61014e6004803603602081101561020957600080fd5b50356105bb565b6101b2610779565b6101586004803603602081101561022e57600080fd5b50356107c7565b610158610867565b61015861086d565b6101586108ac565b6101586108b0565b6101586108b6565b61014e6004803603602081101561027357600080fd5b50356001600160a01b03166108f6565b61014e6109a9565b610158610be6565b61029b610bec565b604080516001600160a01b039092168252519081900360200190f35b6000809054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561030457600080fd5b505afa158015610318573d6000803e3d6000fd5b505050506040513d602081101561032e57600080fd5b50516001600160a01b0316331461038c576040805162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206d75737420626520436f6e74726f6c6c6572206f776e657200604482015290519081900360640190fd5b61039581610bfb565b6103d05760405162461bcd60e51b815260040180806020018281038252602c815260200180610ee2602c913960400191505060405180910390fd5b6003819055604080516020808252600f908201526e1c9bdd5b99131bd8dad05b5bdd5b9d608a1b8183015290517f9f5033568d78ae30f29f01e944f97b2216493bd19d1b46d429673acff3dcd6749181900360600190a150565b60055481565b6000809054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561047d57600080fd5b505afa158015610491573d6000803e3d6000fd5b505050506040513d60208110156104a757600080fd5b50516001600160a01b03163314610505576040805162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206d75737420626520436f6e74726f6c6c6572206f776e657200604482015290519081900360640190fd5b60008281526008602052604090205415610566576040805162461bcd60e51b815260206004820152601d60248201527f4c4950207570677261646520726f756e6420616c726561647920736574000000604482015290519081900360640190fd5b60009182526008602052604090912055565b60086020526000908152604090205481565b600061059461086d565b60045414905090565b60009081526007602052604090205490565b60015481565b60065481565b6000809054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561060857600080fd5b505afa15801561061c573d6000803e3d6000fd5b505050506040513d602081101561063257600080fd5b50516001600160a01b03163314610690576040805162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206d75737420626520436f6e74726f6c6c6572206f776e657200604482015290519081900360640190fd5b600081116106e5576040805162461bcd60e51b815260206004820152601860248201527f726f756e64206c656e6774682063616e6e6f7420626520300000000000000000604482015290519081900360640190fd5b60025461070c5760028190556106f961086d565b6005556107046108b6565b600655610728565b61071461086d565b60055561071f6108b6565b60065560028190555b604080516020808252600b908201526a0e4deeadcc898cadccee8d60ab1b8183015290517f9f5033568d78ae30f29f01e944f97b2216493bd19d1b46d429673acff3dcd6749181900360600190a150565b60008061078a600254600354610c04565b6002549091506107a0908263ffffffff610c2616565b6107bf6107ab6108b6565b6107b36108ac565b9063ffffffff610c2616565b101591505090565b6000806107d26108ac565b90508083106108125760405162461bcd60e51b8152600401808060200182810382526023815260200180610ebf6023913960400191505060405180910390fd5b610100811080610826575061010081038310155b6108615760405162461bcd60e51b815260040180806020018281038252602c815260200180610f0e602c913960400191505060405180910390fd5b50504090565b60045481565b6000806108906002546108846006546107b36108ac565b9063ffffffff610c8316565b6005549091506108a6908263ffffffff610ced16565b91505090565b4390565b60025481565b6000806108cd6002546108846006546107b36108ac565b90506108a66108e760025483610d4790919063ffffffff16565b6006549063ffffffff610ced16565b6000546001600160a01b03163314610955576040805162461bcd60e51b815260206004820152601960248201527f63616c6c6572206d75737420626520436f6e74726f6c6c657200000000000000604482015290519081900360640190fd5b600080546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f4ff638452bbf33c012645d18ae6f05515ff5f2d1dfb0cece8cbf018c60903f709181900360200190a150565b6000809054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109f657600080fd5b505afa158015610a0a573d6000803e3d6000fd5b505050506040513d6020811015610a2057600080fd5b505115610a67576040805162461bcd60e51b815260206004820152601060248201526f1cde5cdd195b481a5cc81c185d5cd95960821b604482015290519081900360640190fd5b6000610a7161086d565b90508060045410610ac9576040805162461bcd60e51b815260206004820152601960248201527f726f756e6420616c726561647920696e697469616c697a656400000000000000604482015290519081900360640190fd5b60048190556000610ae5610ae060016107b36108ac565b6107c7565b60008381526007602052604090208190559050610b00610da0565b6001600160a01b031663713f22166040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b3a57600080fd5b505af1158015610b4e573d6000803e3d6000fd5b50505050610b5a610e3b565b6001600160a01b031663ece2064c6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b9457600080fd5b505af1158015610ba8573d6000803e3d6000fd5b50506040805184815290518593507f22f2fc17c5daf07db2379b3a03a8ef20a183f761097a58fce219c8a14619e78692509081900360200190a25050565b60035481565b6000546001600160a01b031681565b620f4240101590565b6000610c1d620f4240610884858563ffffffff610d4716565b90505b92915050565b600082821115610c7d576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000808211610cd9576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b6000828481610ce457fe5b04949350505050565b600082820183811015610c1d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082610d5657506000610c20565b82820282848281610d6357fe5b0414610c1d5760405162461bcd60e51b8152600401808060200182810382526021815260200180610e9e6021913960400191505060405180910390fd5b60008054604080516d2137b73234b733a6b0b730b3b2b960911b8152815190819003600e018120631c2d8fb360e31b8252600482015290516001600160a01b039092169163e16c7d9891602480820192602092909190829003018186803b158015610e0a57600080fd5b505afa158015610e1e573d6000803e3d6000fd5b505050506040513d6020811015610e3457600080fd5b5051905090565b60008054604080516526b4b73a32b960d11b81528151908190036006018120631c2d8fb360e31b8252600482015290516001600160a01b039092169163e16c7d9891602480820192602092909190829003018186803b158015610e0a57600080fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7763616e206f6e6c79207265747269657665207061737420626c6f636b20686173686573726f756e64206c6f636b20616d6f756e74206d75737420626520612076616c69642070657263656e7461676563616e206f6e6c792072657472696576652068617368657320666f72206c6173742032353620626c6f636b73a265627a7a7231582005dab438fc1ecada8406873694e6c0abdf32cdcdddb5fb78c657a084387332aa64736f6c634300050b0032",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806385df51fd116100ad5780638fa148f2116100715780638fa148f21461025557806392eefe9b1461025d578063d4807fb214610283578063f5b490d51461028b578063f77c4791146102935761012c565b806385df51fd146102185780638807f36e146102355780638a19c8bc1461023d5780638ae63d6d146102455780638b649b941461024d5761012c565b80633aa4add4116100f45780633aa4add4146101c657806351720b41146101e3578063668abff7146101eb578063681312f5146101f35780636841f253146102105761012c565b80630b1573b8146101315780630fe1dfa81461015057806313013e7a1461016a5780631e6d4c221461018d578063219bc76c146101aa575b600080fd5b61014e6004803603602081101561014757600080fd5b50356102b7565b005b61015861042a565b60408051918252519081900360200190f35b61014e6004803603604081101561018057600080fd5b5080359060200135610430565b610158600480360360208110156101a357600080fd5b5035610578565b6101b261058a565b604080519115158252519081900360200190f35b610158600480360360208110156101dc57600080fd5b503561059d565b6101586105af565b6101586105b5565b61014e6004803603602081101561020957600080fd5b50356105bb565b6101b2610779565b6101586004803603602081101561022e57600080fd5b50356107c7565b610158610867565b61015861086d565b6101586108ac565b6101586108b0565b6101586108b6565b61014e6004803603602081101561027357600080fd5b50356001600160a01b03166108f6565b61014e6109a9565b610158610be6565b61029b610bec565b604080516001600160a01b039092168252519081900360200190f35b6000809054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561030457600080fd5b505afa158015610318573d6000803e3d6000fd5b505050506040513d602081101561032e57600080fd5b50516001600160a01b0316331461038c576040805162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206d75737420626520436f6e74726f6c6c6572206f776e657200604482015290519081900360640190fd5b61039581610bfb565b6103d05760405162461bcd60e51b815260040180806020018281038252602c815260200180610ee2602c913960400191505060405180910390fd5b6003819055604080516020808252600f908201526e1c9bdd5b99131bd8dad05b5bdd5b9d608a1b8183015290517f9f5033568d78ae30f29f01e944f97b2216493bd19d1b46d429673acff3dcd6749181900360600190a150565b60055481565b6000809054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561047d57600080fd5b505afa158015610491573d6000803e3d6000fd5b505050506040513d60208110156104a757600080fd5b50516001600160a01b03163314610505576040805162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206d75737420626520436f6e74726f6c6c6572206f776e657200604482015290519081900360640190fd5b60008281526008602052604090205415610566576040805162461bcd60e51b815260206004820152601d60248201527f4c4950207570677261646520726f756e6420616c726561647920736574000000604482015290519081900360640190fd5b60009182526008602052604090912055565b60086020526000908152604090205481565b600061059461086d565b60045414905090565b60009081526007602052604090205490565b60015481565b60065481565b6000809054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561060857600080fd5b505afa15801561061c573d6000803e3d6000fd5b505050506040513d602081101561063257600080fd5b50516001600160a01b03163314610690576040805162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206d75737420626520436f6e74726f6c6c6572206f776e657200604482015290519081900360640190fd5b600081116106e5576040805162461bcd60e51b815260206004820152601860248201527f726f756e64206c656e6774682063616e6e6f7420626520300000000000000000604482015290519081900360640190fd5b60025461070c5760028190556106f961086d565b6005556107046108b6565b600655610728565b61071461086d565b60055561071f6108b6565b60065560028190555b604080516020808252600b908201526a0e4deeadcc898cadccee8d60ab1b8183015290517f9f5033568d78ae30f29f01e944f97b2216493bd19d1b46d429673acff3dcd6749181900360600190a150565b60008061078a600254600354610c04565b6002549091506107a0908263ffffffff610c2616565b6107bf6107ab6108b6565b6107b36108ac565b9063ffffffff610c2616565b101591505090565b6000806107d26108ac565b90508083106108125760405162461bcd60e51b8152600401808060200182810382526023815260200180610ebf6023913960400191505060405180910390fd5b610100811080610826575061010081038310155b6108615760405162461bcd60e51b815260040180806020018281038252602c815260200180610f0e602c913960400191505060405180910390fd5b50504090565b60045481565b6000806108906002546108846006546107b36108ac565b9063ffffffff610c8316565b6005549091506108a6908263ffffffff610ced16565b91505090565b4390565b60025481565b6000806108cd6002546108846006546107b36108ac565b90506108a66108e760025483610d4790919063ffffffff16565b6006549063ffffffff610ced16565b6000546001600160a01b03163314610955576040805162461bcd60e51b815260206004820152601960248201527f63616c6c6572206d75737420626520436f6e74726f6c6c657200000000000000604482015290519081900360640190fd5b600080546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f4ff638452bbf33c012645d18ae6f05515ff5f2d1dfb0cece8cbf018c60903f709181900360200190a150565b6000809054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109f657600080fd5b505afa158015610a0a573d6000803e3d6000fd5b505050506040513d6020811015610a2057600080fd5b505115610a67576040805162461bcd60e51b815260206004820152601060248201526f1cde5cdd195b481a5cc81c185d5cd95960821b604482015290519081900360640190fd5b6000610a7161086d565b90508060045410610ac9576040805162461bcd60e51b815260206004820152601960248201527f726f756e6420616c726561647920696e697469616c697a656400000000000000604482015290519081900360640190fd5b60048190556000610ae5610ae060016107b36108ac565b6107c7565b60008381526007602052604090208190559050610b00610da0565b6001600160a01b031663713f22166040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b3a57600080fd5b505af1158015610b4e573d6000803e3d6000fd5b50505050610b5a610e3b565b6001600160a01b031663ece2064c6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b9457600080fd5b505af1158015610ba8573d6000803e3d6000fd5b50506040805184815290518593507f22f2fc17c5daf07db2379b3a03a8ef20a183f761097a58fce219c8a14619e78692509081900360200190a25050565b60035481565b6000546001600160a01b031681565b620f4240101590565b6000610c1d620f4240610884858563ffffffff610d4716565b90505b92915050565b600082821115610c7d576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000808211610cd9576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b6000828481610ce457fe5b04949350505050565b600082820183811015610c1d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082610d5657506000610c20565b82820282848281610d6357fe5b0414610c1d5760405162461bcd60e51b8152600401808060200182810382526021815260200180610e9e6021913960400191505060405180910390fd5b60008054604080516d2137b73234b733a6b0b730b3b2b960911b8152815190819003600e018120631c2d8fb360e31b8252600482015290516001600160a01b039092169163e16c7d9891602480820192602092909190829003018186803b158015610e0a57600080fd5b505afa158015610e1e573d6000803e3d6000fd5b505050506040513d6020811015610e3457600080fd5b5051905090565b60008054604080516526b4b73a32b960d11b81528151908190036006018120631c2d8fb360e31b8252600482015290516001600160a01b039092169163e16c7d9891602480820192602092909190829003018186803b158015610e0a57600080fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7763616e206f6e6c79207265747269657665207061737420626c6f636b20686173686573726f756e64206c6f636b20616d6f756e74206d75737420626520612076616c69642070657263656e7461676563616e206f6e6c792072657472696576652068617368657320666f72206c6173742032353620626c6f636b73a265627a7a7231582005dab438fc1ecada8406873694e6c0abdf32cdcdddb5fb78c657a084387332aa64736f6c634300050b0032",
"sourceMap": "404:7443:33:-;;;2225:63;8:9:-1;5:2;;;30:1;27;20:12;5:2;2225:63:33;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2225:63:33;911:10:3;:37;;-1:-1:-1;;;;;911:37:3;;;-1:-1:-1;;;;;;911:37:3;;;;;;;;;404:7443:33;;;;;;",
"deployedSourceMap": "404:7443:33:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;404:7443:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3505:289;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3505:289:33;;:::i;:::-;;1164:41;;;:::i;:::-;;;;;;;;;;;;;;;;4848:212;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4848:212:33;;;;;;;:::i;1649:51::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1649:51:33;;:::i;6987:124::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;5761:123;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5761:123:33;;:::i;631:31:5:-;;;:::i;1281:46:33:-;;;:::i;2431:885::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2431:885:33;;:::i;7204:233::-;;;:::i;5277:346::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5277:346:33;;:::i;1072:35::-;;;:::i;5942:411::-;;;:::i;5125:86::-;;;:::i;534:26::-;;;:::i;6426:486::-;;;:::i;1098:164:3:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1098:164:3;-1:-1:-1;;;;;1098:164:3;;:::i;3899:737:33:-;;;:::i;921:30::-;;;:::i;167:29:3:-;;;:::i;:::-;;;;-1:-1:-1;;;;;167:29:3;;;;;;;;;;;;;;3505:289:33;477:10:3;;;;;;;;;-1:-1:-1;;;;;477:10:3;-1:-1:-1;;;;;477:16:3;;:18;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;477:18:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;477:18:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;477:18:3;-1:-1:-1;;;;;463:32:3;:10;:32;455:76;;;;;-1:-1:-1;;;455:76:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;3606:37:33;3626:16;3606:19;:37::i;:::-;3598:94;;;;-1:-1:-1;;;3598:94:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3703:15;:34;;;3753;;;;;;;;;;;;-1:-1:-1;;;3753:34:33;;;;;;;;;;;;;;;3505:289;:::o;1164:41::-;;;;:::o;4848:212::-;477:10:3;;;;;;;;;-1:-1:-1;;;;;477:10:3;-1:-1:-1;;;;;477:16:3;;:18;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;477:18:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;477:18:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;477:18:3;-1:-1:-1;;;;;463:32:3;:10;:32;455:76;;;;;-1:-1:-1;;;455:76:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;4953:21:33;;;;:15;:21;;;;;;:26;4945:68;;;;;-1:-1:-1;;;4945:68:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;5023:21;;;;:15;:21;;;;;;:30;4848:212::o;1649:51::-;;;;;;;;;;;;;:::o;6987:124::-;7043:4;7090:14;:12;:14::i;:::-;7066:20;;:38;7059:45;;6987:124;:::o;5761:123::-;5825:7;5851:26;;;:18;:26;;;;;;;5761:123::o;631:31:5:-;;;;:::o;1281:46:33:-;;;;:::o;2431:885::-;477:10:3;;;;;;;;;-1:-1:-1;;;;;477:10:3;-1:-1:-1;;;;;477:16:3;;:18;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;477:18:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;477:18:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;477:18:3;-1:-1:-1;;;;;463:32:3;:10;:32;455:76;;;;;-1:-1:-1;;;455:76:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;2539:1:33;2524:12;:16;2516:53;;;;;-1:-1:-1;;;2516:53:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;2584:11;;2580:684;;2772:11;:26;;;2841:14;:12;:14::i;:::-;2812:26;:43;2903:24;:22;:24::i;:::-;2869:31;:58;2580:684;;;3127:14;:12;:14::i;:::-;3098:26;:43;3189:24;:22;:24::i;:::-;3155:31;:58;3227:11;:26;;;2580:684;3279:30;;;;;;;;;;;;-1:-1:-1;;;3279:30:33;;;;;;;;;;;;;;;2431:885;:::o;7204:233::-;7255:4;7271:20;7294:46;7311:11;;7324:15;;7294:16;:46::i;:::-;7401:11;;7271:69;;-1:-1:-1;7401:29:33;;7271:69;7401:29;:15;:29;:::i;:::-;7357:40;7372:24;:22;:24::i;:::-;7357:10;:8;:10::i;:::-;:14;:40;:14;:40;:::i;:::-;:73;;7350:80;;;7204:233;:::o;5277:346::-;5333:7;5352:20;5375:10;:8;:10::i;:::-;5352:33;;5412:12;5403:6;:21;5395:69;;;;-1:-1:-1;;;5395:69:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5497:3;5482:12;:18;:50;;;;5529:3;5514:12;:18;5504:6;:28;;5482:50;5474:107;;;;-1:-1:-1;;;5474:107:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5599:17:33;;5277:346::o;1072:35::-;;;;:::o;5942:411::-;5987:7;6072:25;6100:64;6152:11;;6100:47;6115:31;;6100:10;:8;:10::i;:47::-;:51;:64;:51;:64;:::i;:::-;6297:26;;6072:92;;-1:-1:-1;6297:49:33;;6072:92;6297:49;:30;:49;:::i;:::-;6290:56;;;5942:411;:::o;5125:86::-;5192:12;5125:86;:::o;534:26::-;;;;:::o;6426:486::-;6481:7;6566:25;6594:64;6646:11;;6594:47;6609:31;;6594:10;:8;:10::i;:64::-;6566:92;;6834:71;6870:34;6892:11;;6870:17;:21;;:34;;;;:::i;:::-;6834:31;;;:71;:35;:71;:::i;1098:164:3:-;306:10;;-1:-1:-1;;;;;306:10:3;284;:33;276:71;;;;;-1:-1:-1;;;276:71:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;1176:10;:37;;-1:-1:-1;;;;;1176:37:3;;-1:-1:-1;;;;;;1176:37:3;;;;;;;;1229:26;;;;;;;;;;;;;;;;1098:164;:::o;3899:737:33:-;646:10:3;;;;;;;;;-1:-1:-1;;;;;646:10:3;-1:-1:-1;;;;;646:17:3;;:19;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;646:19:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;646:19:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;646:19:3;645:20;637:49;;;;;-1:-1:-1;;;637:49:3;;;;;;;;;;;;-1:-1:-1;;;637:49:3;;;;;;;;;;;;;;;3965:17:33;3985:14;:12;:14::i;:::-;3965:34;;4098:9;4075:20;;:32;4067:70;;;;;-1:-1:-1;;;4067:70:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;4192:20;:32;;;4272:22;4297:28;4307:17;4322:1;4307:10;:8;:10::i;:17::-;4297:9;:28::i;:::-;4335:29;;;;:18;:29;;;;;:46;;;4272:53;-1:-1:-1;4439:16:33;:14;:16::i;:::-;-1:-1:-1;;;;;4439:48:33;;:50;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4439:50:33;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4439:50:33;;;;4545:8;:6;:8::i;:::-;-1:-1:-1;;;;;4545:31:33;;:33;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4545:33:33;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;4594:35:33;;;;;;;;4603:9;;-1:-1:-1;4594:35:33;;-1:-1:-1;4594:35:33;;;;;;;;696:1:3;;3899:737:33:o;921:30::-;;;;:::o;167:29:3:-;;;-1:-1:-1;;;;;167:29:3;;:::o;408:112:14:-;233:7;-1:-1:-1;490:23:14;;408:112::o;1318:146::-;1392:7;1418:39;233:7;1418:21;:7;1430:8;1418:21;:11;:21;:::i;:39::-;1411:46;;1318:146;;;;;:::o;1274:179:82:-;1332:7;1364:1;1359;:6;;1351:49;;;;;-1:-1:-1;;;1351:49:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1422:5:82;;;1274:179::o;2606:326::-;2664:7;2761:1;2757;:5;2749:44;;;;;-1:-1:-1;;;2749:44:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;2803:9;2819:1;2815;:5;;;;;;;2606:326;-1:-1:-1;;;;2606:326:82:o;834:176::-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;938:46:82;;;;;;;;;;;;;;;;;;;;;;;;;;;1693:458;1751:7;1991:6;1987:45;;-1:-1:-1;2020:1:82;2013:8;;1987:45;2054:5;;;2058:1;2054;:5;:1;2077:5;;;;;:10;2069:56;;;;-1:-1:-1;;;2069:56:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7503:158:33;7552:15;7602:10;;7625:27;;;-1:-1:-1;;;7625:27:33;;;;;;;;;;;;-1:-1:-1;;;7602:51:33;;;;;;;;-1:-1:-1;;;;;7602:10:33;;;;:22;;:51;;;;;;;;;;;;;;;:10;:51;;;5:2:-1;;;;30:1;27;20:12;5:2;7602:51:33;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7602:51:33;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7602:51:33;;-1:-1:-1;7503:158:33;:::o;7719:126::-;7760:7;7794:10;;7817:19;;;-1:-1:-1;;;7817:19:33;;;;;;;;;;;;-1:-1:-1;;;7794:43:33;;;;;;;;-1:-1:-1;;;;;7794:10:33;;;;:22;;:43;;;;;;;;;;;;;;;:10;:43;;;5:2:-1;;;;30:1;27;20:12",
"source": "pragma solidity ^0.5.11;\n\nimport \"../ManagerProxyTarget.sol\";\nimport \"./IRoundsManager.sol\";\nimport \"../bonding/IBondingManager.sol\";\nimport \"../token/IMinter.sol\";\nimport \"../libraries/MathUtils.sol\";\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\n\n\n/**\n * @title RoundsManager\n * @notice Manages round progression and other blockchain time related operations of the Livepeer protocol\n */\ncontract RoundsManager is ManagerProxyTarget, IRoundsManager {\n using SafeMath for uint256;\n\n // Round length in blocks\n uint256 public roundLength;\n // Lock period of a round as a % of round length\n // Transcoders cannot join the transcoder pool or change their rates during the lock period at the end of a round\n // The lock period provides delegators time to review transcoder information without changes\n // # of blocks in the lock period = (roundLength * roundLockAmount) / PERC_DIVISOR\n uint256 public roundLockAmount;\n // Last initialized round. After first round, this is the last round during which initializeRound() was called\n uint256 public lastInitializedRound;\n // Round in which roundLength was last updated\n uint256 public lastRoundLengthUpdateRound;\n // Start block of the round in which roundLength was last updated\n uint256 public lastRoundLengthUpdateStartBlock;\n\n // Mapping round number => block hash for the round\n mapping (uint256 => bytes32) internal _blockHashForRound;\n\n // LIP Upgrade Rounds\n // These can be used in conditionals to ensure backwards compatibility or skip such backwards compatibility logic\n // in case 'currentRound' > LIP-X upgrade round\n mapping (uint256 => uint256) public lipUpgradeRound; // mapping (LIP-number > round number)\n\n /**\n * @notice RoundsManager constructor. Only invokes constructor of base Manager contract with provided Controller address\n * @dev This constructor will not initialize any state variables besides `controller`. The following setter functions\n * should be used to initialize state variables post-deployment:\n * - setRoundLength()\n * - setRoundLockAmount()\n * @param _controller Address of Controller that this contract will be registered with\n */\n constructor(address _controller) public Manager(_controller) {}\n\n /**\n * @notice Set round length. Only callable by the controller owner\n * @param _roundLength Round length in blocks\n */\n function setRoundLength(uint256 _roundLength) external onlyControllerOwner {\n require(_roundLength > 0, \"round length cannot be 0\");\n\n if (roundLength == 0) {\n // If first time initializing roundLength, set roundLength before\n // lastRoundLengthUpdateRound and lastRoundLengthUpdateStartBlock\n roundLength = _roundLength;\n lastRoundLengthUpdateRound = currentRound();\n lastRoundLengthUpdateStartBlock = currentRoundStartBlock();\n } else {\n // If updating roundLength, set roundLength after\n // lastRoundLengthUpdateRound and lastRoundLengthUpdateStartBlock\n lastRoundLengthUpdateRound = currentRound();\n lastRoundLengthUpdateStartBlock = currentRoundStartBlock();\n roundLength = _roundLength;\n }\n\n emit ParameterUpdate(\"roundLength\");\n }\n\n /**\n * @notice Set round lock amount. Only callable by the controller owner\n * @param _roundLockAmount Round lock amount as a % of the number of blocks in a round\n */\n function setRoundLockAmount(uint256 _roundLockAmount) external onlyControllerOwner {\n require(MathUtils.validPerc(_roundLockAmount), \"round lock amount must be a valid percentage\");\n\n roundLockAmount = _roundLockAmount;\n\n emit ParameterUpdate(\"roundLockAmount\");\n }\n\n /**\n * @notice Initialize the current round. Called once at the start of any round\n */\n function initializeRound() external whenSystemNotPaused {\n uint256 currRound = currentRound();\n\n // Check if already called for the current round\n require(lastInitializedRound < currRound, \"round already initialized\");\n\n // Set current round as initialized\n lastInitializedRound = currRound;\n // Store block hash for round\n bytes32 roundBlockHash = blockHash(blockNum().sub(1));\n _blockHashForRound[currRound] = roundBlockHash;\n // Set total active stake for the round\n bondingManager().setCurrentRoundTotalActiveStake();\n // Set mintable rewards for the round\n minter().setCurrentRewardTokens();\n\n emit NewRound(currRound, roundBlockHash);\n }\n\n /**\n * @notice setLIPUpgradeRound sets the round an LIP upgrade would become active.\n * @param _lip the LIP number.\n * @param _round (optional) the round in which the LIP becomes active\n */\n function setLIPUpgradeRound(uint256 _lip, uint256 _round) external onlyControllerOwner {\n require(lipUpgradeRound[_lip] == 0, \"LIP upgrade round already set\");\n lipUpgradeRound[_lip] = _round;\n }\n\n /**\n * @notice Return current block number\n */\n function blockNum() public view returns (uint256) {\n return block.number;\n }\n\n /**\n * @notice Return blockhash for a block\n */\n function blockHash(uint256 _block) public view returns (bytes32) {\n uint256 currentBlock = blockNum();\n require(_block < currentBlock, \"can only retrieve past block hashes\");\n require(currentBlock < 256 || _block >= currentBlock - 256, \"can only retrieve hashes for last 256 blocks\");\n\n return blockhash(_block);\n }\n\n /**\n * @notice Return blockhash for a round\n * @param _round Round number\n * @return Blockhash for `_round`\n */\n function blockHashForRound(uint256 _round) public view returns (bytes32) {\n return _blockHashForRound[_round];\n }\n\n /**\n * @notice Return current round\n */\n function currentRound() public view returns (uint256) {\n // Compute # of rounds since roundLength was last updated\n uint256 roundsSinceUpdate = blockNum().sub(lastRoundLengthUpdateStartBlock).div(roundLength);\n // Current round = round that roundLength was last updated + # of rounds since roundLength was last updated\n return lastRoundLengthUpdateRound.add(roundsSinceUpdate);\n }\n\n /**\n * @notice Return start block of current round\n */\n function currentRoundStartBlock() public view returns (uint256) {\n // Compute # of rounds since roundLength was last updated\n uint256 roundsSinceUpdate = blockNum().sub(lastRoundLengthUpdateStartBlock).div(roundLength);\n // Current round start block = start block of round that roundLength was last updated + (# of rounds since roundLenght was last updated * roundLength)\n return lastRoundLengthUpdateStartBlock.add(roundsSinceUpdate.mul(roundLength));\n }\n\n /**\n * @notice Check if current round is initialized\n */\n function currentRoundInitialized() public view returns (bool) {\n return lastInitializedRound == currentRound();\n }\n\n /**\n * @notice Check if we are in the lock period of the current round\n */\n function currentRoundLocked() public view returns (bool) {\n uint256 lockedBlocks = MathUtils.percOf(roundLength, roundLockAmount);\n return blockNum().sub(currentRoundStartBlock()) >= roundLength.sub(lockedBlocks);\n }\n\n /**\n * @dev Return BondingManager interface\n */\n function bondingManager() internal view returns (IBondingManager) {\n return IBondingManager(controller.getContract(keccak256(\"BondingManager\")));\n }\n\n /**\n * @dev Return Minter interface\n */\n function minter() internal view returns (IMinter) {\n return IMinter(controller.getContract(keccak256(\"Minter\")));\n }\n}\n",
"sourcePath": "/Users/nico/Desktop/livepeer/protocol/contracts/rounds/RoundsManager.sol",
"ast": {
"absolutePath": "/Users/nico/Desktop/livepeer/protocol/contracts/rounds/RoundsManager.sol",
"exportedSymbols": {
"RoundsManager": [
11366
]
},
"id": 11367,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 10998,
"literals": [
"solidity",
"^",
"0.5",
".11"
],
"nodeType": "PragmaDirective",
"src": "0:24:33"
},
{
"absolutePath": "/Users/nico/Desktop/livepeer/protocol/contracts/ManagerProxyTarget.sol",
"file": "../ManagerProxyTarget.sol",
"id": 10999,
"nodeType": "ImportDirective",
"scope": 11367,
"sourceUnit": 305,
"src": "26:35:33",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/nico/Desktop/livepeer/protocol/contracts/rounds/IRoundsManager.sol",
"file": "./IRoundsManager.sol",
"id": 11000,
"nodeType": "ImportDirective",
"scope": 11367,
"sourceUnit": 10997,
"src": "62:30:33",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/nico/Desktop/livepeer/protocol/contracts/bonding/IBondingManager.sol",
"file": "../bonding/IBondingManager.sol",
"id": 11001,
"nodeType": "ImportDirective",
"scope": 11367,
"sourceUnit": 3937,
"src": "93:40:33",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/nico/Desktop/livepeer/protocol/contracts/token/IMinter.sol",
"file": "../token/IMinter.sol",
"id": 11002,
"nodeType": "ImportDirective",
"scope": 11367,
"sourceUnit": 27165,
"src": "134:30:33",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/nico/Desktop/livepeer/protocol/contracts/libraries/MathUtils.sol",
"file": "../libraries/MathUtils.sol",
"id": 11003,
"nodeType": "ImportDirective",
"scope": 11367,
"sourceUnit": 7909,
"src": "165:36:33",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"file": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"id": 11004,
"nodeType": "ImportDirective",
"scope": 11367,
"sourceUnit": 28379,
"src": "203:59:33",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11005,
"name": "ManagerProxyTarget",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 304,
"src": "430:18:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ManagerProxyTarget_$304",
"typeString": "contract ManagerProxyTarget"
}
},
"id": 11006,
"nodeType": "InheritanceSpecifier",
"src": "430:18:33"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11007,
"name": "IRoundsManager",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 10996,
"src": "450:14:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IRoundsManager_$10996",
"typeString": "contract IRoundsManager"
}
},
"id": 11008,
"nodeType": "InheritanceSpecifier",
"src": "450:14:33"
}
],
"contractDependencies": [
164,
254,
304,
10996
],
"contractKind": "contract",
"documentation": "@title RoundsManager\n@notice Manages round progression and other blockchain time related operations of the Livepeer protocol",
"fullyImplemented": true,
"id": 11366,
"linearizedBaseContracts": [
11366,
10996,
304,
254,
164
],
"name": "RoundsManager",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 11011,
"libraryName": {
"contractScope": null,
"id": 11009,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 28378,
"src": "477:8:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$28378",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "471:27:33",
"typeName": {
"id": 11010,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "490:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": false,
"id": 11013,
"name": "roundLength",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "534:26:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11012,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "534:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 11015,
"name": "roundLockAmount",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "921:30:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11014,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "921:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 11017,
"name": "lastInitializedRound",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "1072:35:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11016,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1072:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 11019,
"name": "lastRoundLengthUpdateRound",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "1164:41:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11018,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1164:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 11021,
"name": "lastRoundLengthUpdateStartBlock",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "1281:46:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11020,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1281:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 11025,
"name": "_blockHashForRound",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "1390:56:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
},
"typeName": {
"id": 11024,
"keyType": {
"id": 11022,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1399:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "1390:28:33",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
},
"valueType": {
"id": 11023,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1410:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11029,
"name": "lipUpgradeRound",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "1649:51:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"typeName": {
"id": 11028,
"keyType": {
"id": 11026,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1658:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "1649:28:33",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"valueType": {
"id": 11027,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1669:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 11037,
"nodeType": "Block",
"src": "2286:2:33",
"statements": []
},
"documentation": "@notice RoundsManager constructor. Only invokes constructor of base Manager contract with provided Controller address\n@dev This constructor will not initialize any state variables besides `controller`. The following setter functions\nshould be used to initialize state variables post-deployment:\n- setRoundLength()\n- setRoundLockAmount()\n@param _controller Address of Controller that this contract will be registered with",
"id": 11038,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 11034,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11031,
"src": "2273:11:33",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 11035,
"modifierName": {
"argumentTypes": null,
"id": 11033,
"name": "Manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 254,
"src": "2265:7:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Manager_$254_$",
"typeString": "type(contract Manager)"
}
},
"nodeType": "ModifierInvocation",
"src": "2265:20:33"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11032,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11031,
"name": "_controller",
"nodeType": "VariableDeclaration",
"scope": 11038,
"src": "2237:19:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 11030,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2237:7:33",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2236:21:33"
},
"returnParameters": {
"id": 11036,
"nodeType": "ParameterList",
"parameters": [],
"src": "2286:0:33"
},
"scope": 11366,
"src": "2225:63:33",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 11090,
"nodeType": "Block",
"src": "2506:810:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11048,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11046,
"name": "_roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11040,
"src": "2524:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 11047,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2539:1:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2524:16:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "726f756e64206c656e6774682063616e6e6f742062652030",
"id": 11049,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2542:26:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_971dc2ea23e68f234420250330e2772d778b5a3747e4b89633a4525391e5965b",
"typeString": "literal_string \"round length cannot be 0\""
},
"value": "round length cannot be 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_971dc2ea23e68f234420250330e2772d778b5a3747e4b89633a4525391e5965b",
"typeString": "literal_string \"round length cannot be 0\""
}
],
"id": 11045,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
28862,
28863
],
"referencedDeclaration": 28863,
"src": "2516:7:33",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11050,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2516:53:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11051,
"nodeType": "ExpressionStatement",
"src": "2516:53:33"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11054,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11052,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "2584:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 11053,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2599:1:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2584:16:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 11084,
"nodeType": "Block",
"src": "2944:320:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 11073,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11070,
"name": "lastRoundLengthUpdateRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11019,
"src": "3098:26:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11071,
"name": "currentRound",
"nodeType": "Identifier",
"overloadedDeclarations": [
11273
],
"referencedDeclaration": 11273,
"src": "3127:12:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11072,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3127:14:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3098:43:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11074,
"nodeType": "ExpressionStatement",
"src": "3098:43:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11078,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11075,
"name": "lastRoundLengthUpdateStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11021,
"src": "3155:31:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11076,
"name": "currentRoundStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [
11298
],
"referencedDeclaration": 11298,
"src": "3189:22:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11077,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3189:24:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3155:58:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11079,
"nodeType": "ExpressionStatement",
"src": "3155:58:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11082,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11080,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "3227:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 11081,
"name": "_roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11040,
"src": "3241:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3227:26:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11083,
"nodeType": "ExpressionStatement",
"src": "3227:26:33"
}
]
},
"id": 11085,
"nodeType": "IfStatement",
"src": "2580:684:33",
"trueBody": {
"id": 11069,
"nodeType": "Block",
"src": "2602:336:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 11057,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11055,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "2772:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 11056,
"name": "_roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11040,
"src": "2786:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2772:26:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11058,
"nodeType": "ExpressionStatement",
"src": "2772:26:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11062,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11059,
"name": "lastRoundLengthUpdateRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11019,
"src": "2812:26:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11060,
"name": "currentRound",
"nodeType": "Identifier",
"overloadedDeclarations": [
11273
],
"referencedDeclaration": 11273,
"src": "2841:12:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11061,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2841:14:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2812:43:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11063,
"nodeType": "ExpressionStatement",
"src": "2812:43:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11067,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11064,
"name": "lastRoundLengthUpdateStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11021,
"src": "2869:31:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11065,
"name": "currentRoundStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [
11298
],
"referencedDeclaration": 11298,
"src": "2903:22:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11066,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2903:24:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2869:58:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11068,
"nodeType": "ExpressionStatement",
"src": "2869:58:33"
}
]
}
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "726f756e644c656e677468",
"id": 11087,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3295:13:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_1c401584e7969bf658ddc956ef5c1ed10fe9f27c9c8486a19bc5db738543161c",
"typeString": "literal_string \"roundLength\""
},
"value": "roundLength"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_1c401584e7969bf658ddc956ef5c1ed10fe9f27c9c8486a19bc5db738543161c",
"typeString": "literal_string \"roundLength\""
}
],
"id": 11086,
"name": "ParameterUpdate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 158,
"src": "3279:15:33",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory)"
}
},
"id": 11088,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3279:30:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11089,
"nodeType": "EmitStatement",
"src": "3274:35:33"
}
]
},
"documentation": "@notice Set round length. Only callable by the controller owner\n@param _roundLength Round length in blocks",
"id": 11091,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 11043,
"modifierName": {
"argumentTypes": null,
"id": 11042,
"name": "onlyControllerOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 200,
"src": "2486:19:33",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "2486:19:33"
}
],
"name": "setRoundLength",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11041,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11040,
"name": "_roundLength",
"nodeType": "VariableDeclaration",
"scope": 11091,
"src": "2455:20:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11039,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2455:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2454:22:33"
},
"returnParameters": {
"id": 11044,
"nodeType": "ParameterList",
"parameters": [],
"src": "2506:0:33"
},
"scope": 11366,
"src": "2431:885:33",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 11114,
"nodeType": "Block",
"src": "3588:206:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11101,
"name": "_roundLockAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11093,
"src": "3626:16:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 11099,
"name": "MathUtils",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7908,
"src": "3606:9:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_MathUtils_$7908_$",
"typeString": "type(library MathUtils)"
}
},
"id": 11100,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "validPerc",
"nodeType": "MemberAccess",
"referencedDeclaration": 7848,
"src": "3606:19:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_bool_$",
"typeString": "function (uint256) pure returns (bool)"
}
},
"id": 11102,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3606:37:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "726f756e64206c6f636b20616d6f756e74206d75737420626520612076616c69642070657263656e74616765",
"id": 11103,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3645:46:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_96adb1afe76881d224da1e31bfc0872e0dfff03697b772ac8d6990c7c31817dc",
"typeString": "literal_string \"round lock amount must be a valid percentage\""
},
"value": "round lock amount must be a valid percentage"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_96adb1afe76881d224da1e31bfc0872e0dfff03697b772ac8d6990c7c31817dc",
"typeString": "literal_string \"round lock amount must be a valid percentage\""
}
],
"id": 11098,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
28862,
28863
],
"referencedDeclaration": 28863,
"src": "3598:7:33",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11104,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3598:94:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11105,
"nodeType": "ExpressionStatement",
"src": "3598:94:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11108,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11106,
"name": "roundLockAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11015,
"src": "3703:15:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 11107,
"name": "_roundLockAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11093,
"src": "3721:16:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3703:34:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11109,
"nodeType": "ExpressionStatement",
"src": "3703:34:33"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "726f756e644c6f636b416d6f756e74",
"id": 11111,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3769:17:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_136718dbf37afd14697d21880ed8ae94abd2698e8ab7679bff4265cb01b1456a",
"typeString": "literal_string \"roundLockAmount\""
},
"value": "roundLockAmount"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_136718dbf37afd14697d21880ed8ae94abd2698e8ab7679bff4265cb01b1456a",
"typeString": "literal_string \"roundLockAmount\""
}
],
"id": 11110,
"name": "ParameterUpdate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 158,
"src": "3753:15:33",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory)"
}
},
"id": 11112,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3753:34:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11113,
"nodeType": "EmitStatement",
"src": "3748:39:33"
}
]
},
"documentation": "@notice Set round lock amount. Only callable by the controller owner\n@param _roundLockAmount Round lock amount as a % of the number of blocks in a round",
"id": 11115,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 11096,
"modifierName": {
"argumentTypes": null,
"id": 11095,
"name": "onlyControllerOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 200,
"src": "3568:19:33",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "3568:19:33"
}
],
"name": "setRoundLockAmount",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11094,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11093,
"name": "_roundLockAmount",
"nodeType": "VariableDeclaration",
"scope": 11115,
"src": "3533:24:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11092,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3533:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3532:26:33"
},
"returnParameters": {
"id": 11097,
"nodeType": "ParameterList",
"parameters": [],
"src": "3588:0:33"
},
"scope": 11366,
"src": "3505:289:33",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 11167,
"nodeType": "Block",
"src": "3955:681:33",
"statements": [
{
"assignments": [
11121
],
"declarations": [
{
"constant": false,
"id": 11121,
"name": "currRound",
"nodeType": "VariableDeclaration",
"scope": 11167,
"src": "3965:17:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11120,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3965:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11124,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11122,
"name": "currentRound",
"nodeType": "Identifier",
"overloadedDeclarations": [
11273
],
"referencedDeclaration": 11273,
"src": "3985:12:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11123,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3985:14:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3965:34:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11128,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11126,
"name": "lastInitializedRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11017,
"src": "4075:20:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 11127,
"name": "currRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11121,
"src": "4098:9:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4075:32:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "726f756e6420616c726561647920696e697469616c697a6564",
"id": 11129,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4109:27:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_288b5f4be5b8f91c83fdf535f5cec6e55292f93c109fb2c0a8f2dca6908365c7",
"typeString": "literal_string \"round already initialized\""
},
"value": "round already initialized"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_288b5f4be5b8f91c83fdf535f5cec6e55292f93c109fb2c0a8f2dca6908365c7",
"typeString": "literal_string \"round already initialized\""
}
],
"id": 11125,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
28862,
28863
],
"referencedDeclaration": 28863,
"src": "4067:7:33",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11130,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4067:70:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11131,
"nodeType": "ExpressionStatement",
"src": "4067:70:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11132,
"name": "lastInitializedRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11017,
"src": "4192:20:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 11133,
"name": "currRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11121,
"src": "4215:9:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4192:32:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11135,
"nodeType": "ExpressionStatement",
"src": "4192:32:33"
},
{
"assignments": [
11137
],
"declarations": [
{
"constant": false,
"id": 11137,
"name": "roundBlockHash",
"nodeType": "VariableDeclaration",
"scope": 11167,
"src": "4272:22:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 11136,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "4272:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11145,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 11142,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4322:1:33",
"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,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11139,
"name": "blockNum",
"nodeType": "Identifier",
"overloadedDeclarations": [
11202
],
"referencedDeclaration": 11202,
"src": "4307:8:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11140,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4307:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11141,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 28297,
"src": "4307:14:33",
"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": 11143,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4307:17:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 11138,
"name": "blockHash",
"nodeType": "Identifier",
"overloadedDeclarations": [
11239
],
"referencedDeclaration": 11239,
"src": "4297:9:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$",
"typeString": "function (uint256) view returns (bytes32)"
}
},
"id": 11144,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4297:28:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4272:53:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11150,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 11146,
"name": "_blockHashForRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11025,
"src": "4335:18:33",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
}
},
"id": 11148,
"indexExpression": {
"argumentTypes": null,
"id": 11147,
"name": "currRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11121,
"src": "4354:9:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "4335:29:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 11149,
"name": "roundBlockHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11137,
"src": "4367:14:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "4335:46:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 11151,
"nodeType": "ExpressionStatement",
"src": "4335:46:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11152,
"name": "bondingManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11350,
"src": "4439:14:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IBondingManager_$3936_$",
"typeString": "function () view returns (contract IBondingManager)"
}
},
"id": 11153,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4439:16:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IBondingManager_$3936",
"typeString": "contract IBondingManager"
}
},
"id": 11154,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCurrentRoundTotalActiveStake",
"nodeType": "MemberAccess",
"referencedDeclaration": 3911,
"src": "4439:48:33",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
"typeString": "function () external"
}
},
"id": 11155,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4439:50:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11156,
"nodeType": "ExpressionStatement",
"src": "4439:50:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11157,
"name": "minter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11365,
"src": "4545:6:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IMinter_$27164_$",
"typeString": "function () view returns (contract IMinter)"
}
},
"id": 11158,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4545:8:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IMinter_$27164",
"typeString": "contract IMinter"
}
},
"id": 11159,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCurrentRewardTokens",
"nodeType": "MemberAccess",
"referencedDeclaration": 27148,
"src": "4545:31:33",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
"typeString": "function () external"
}
},
"id": 11160,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4545:33:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11161,
"nodeType": "ExpressionStatement",
"src": "4545:33:33"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11163,
"name": "currRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11121,
"src": "4603:9:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 11164,
"name": "roundBlockHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11137,
"src": "4614:14:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 11162,
"name": "NewRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10946,
"src": "4594:8:33",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bytes32_$returns$__$",
"typeString": "function (uint256,bytes32)"
}
},
"id": 11165,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4594:35:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11166,
"nodeType": "EmitStatement",
"src": "4589:40:33"
}
]
},
"documentation": "@notice Initialize the current round. Called once at the start of any round",
"id": 11168,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 11118,
"modifierName": {
"argumentTypes": null,
"id": 11117,
"name": "whenSystemNotPaused",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 212,
"src": "3935:19:33",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "3935:19:33"
}
],
"name": "initializeRound",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11116,
"nodeType": "ParameterList",
"parameters": [],
"src": "3923:2:33"
},
"returnParameters": {
"id": 11119,
"nodeType": "ParameterList",
"parameters": [],
"src": "3955:0:33"
},
"scope": 11366,
"src": "3899:737:33",
"stateMutability": "nonpayable",
"superFunction": 10949,
"visibility": "external"
},
{
"body": {
"id": 11192,
"nodeType": "Block",
"src": "4935:125:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11182,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 11178,
"name": "lipUpgradeRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11029,
"src": "4953:15:33",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 11180,
"indexExpression": {
"argumentTypes": null,
"id": 11179,
"name": "_lip",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11170,
"src": "4969:4:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4953:21:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 11181,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4978:1:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4953:26:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4c4950207570677261646520726f756e6420616c726561647920736574",
"id": 11183,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4981:31:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8fa9b3e47a4c212b7a0e2c32675fd2c558d462d8cd05fae907bac72879806196",
"typeString": "literal_string \"LIP upgrade round already set\""
},
"value": "LIP upgrade round already set"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8fa9b3e47a4c212b7a0e2c32675fd2c558d462d8cd05fae907bac72879806196",
"typeString": "literal_string \"LIP upgrade round already set\""
}
],
"id": 11177,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
28862,
28863
],
"referencedDeclaration": 28863,
"src": "4945:7:33",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11184,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4945:68:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11185,
"nodeType": "ExpressionStatement",
"src": "4945:68:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11190,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 11186,
"name": "lipUpgradeRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11029,
"src": "5023:15:33",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 11188,
"indexExpression": {
"argumentTypes": null,
"id": 11187,
"name": "_lip",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11170,
"src": "5039:4:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "5023:21:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 11189,
"name": "_round",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11172,
"src": "5047:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5023:30:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11191,
"nodeType": "ExpressionStatement",
"src": "5023:30:33"
}
]
},
"documentation": "@notice setLIPUpgradeRound sets the round an LIP upgrade would become active.\n@param _lip the LIP number.\n@param _round (optional) the round in which the LIP becomes active",
"id": 11193,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 11175,
"modifierName": {
"argumentTypes": null,
"id": 11174,
"name": "onlyControllerOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 200,
"src": "4915:19:33",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "4915:19:33"
}
],
"name": "setLIPUpgradeRound",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11173,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11170,
"name": "_lip",
"nodeType": "VariableDeclaration",
"scope": 11193,
"src": "4876:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11169,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4876:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11172,
"name": "_round",
"nodeType": "VariableDeclaration",
"scope": 11193,
"src": "4890:14:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11171,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4890:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4875:30:33"
},
"returnParameters": {
"id": 11176,
"nodeType": "ParameterList",
"parameters": [],
"src": "4935:0:33"
},
"scope": 11366,
"src": "4848:212:33",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 11201,
"nodeType": "Block",
"src": "5175:36:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 11198,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28849,
"src": "5192:5:33",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 11199,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "number",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5192:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 11197,
"id": 11200,
"nodeType": "Return",
"src": "5185:19:33"
}
]
},
"documentation": "@notice Return current block number",
"id": 11202,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "blockNum",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11194,
"nodeType": "ParameterList",
"parameters": [],
"src": "5142:2:33"
},
"returnParameters": {
"id": 11197,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11196,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11202,
"src": "5166:7:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11195,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5166:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5165:9:33"
},
"scope": 11366,
"src": "5125:86:33",
"stateMutability": "view",
"superFunction": 10961,
"visibility": "public"
},
{
"body": {
"id": 11238,
"nodeType": "Block",
"src": "5342:281:33",
"statements": [
{
"assignments": [
11210
],
"declarations": [
{
"constant": false,
"id": 11210,
"name": "currentBlock",
"nodeType": "VariableDeclaration",
"scope": 11238,
"src": "5352:20:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11209,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5352:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11213,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11211,
"name": "blockNum",
"nodeType": "Identifier",
"overloadedDeclarations": [
11202
],
"referencedDeclaration": 11202,
"src": "5375:8:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11212,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5375:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5352:33:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11217,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11215,
"name": "_block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11204,
"src": "5403:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 11216,
"name": "currentBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11210,
"src": "5412:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5403:21:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "63616e206f6e6c79207265747269657665207061737420626c6f636b20686173686573",
"id": 11218,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5426:37:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_954f82202aa8c55851f45963f6e3a3f5838e2f61793fa3bad81ff962d2ecd9ed",
"typeString": "literal_string \"can only retrieve past block hashes\""
},
"value": "can only retrieve past block hashes"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_954f82202aa8c55851f45963f6e3a3f5838e2f61793fa3bad81ff962d2ecd9ed",
"typeString": "literal_string \"can only retrieve past block hashes\""
}
],
"id": 11214,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
28862,
28863
],
"referencedDeclaration": 28863,
"src": "5395:7:33",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5395:69:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11220,
"nodeType": "ExpressionStatement",
"src": "5395:69:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 11230,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11224,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11222,
"name": "currentBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11210,
"src": "5482:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"hexValue": "323536",
"id": 11223,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5497:3:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_256_by_1",
"typeString": "int_const 256"
},
"value": "256"
},
"src": "5482:18:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11229,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11225,
"name": "_block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11204,
"src": "5504:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11228,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11226,
"name": "currentBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11210,
"src": "5514:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "323536",
"id": 11227,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5529:3:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_256_by_1",
"typeString": "int_const 256"
},
"value": "256"
},
"src": "5514:18:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5504:28:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "5482:50:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "63616e206f6e6c792072657472696576652068617368657320666f72206c6173742032353620626c6f636b73",
"id": 11231,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5534:46:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f7a45d329a3b70387cbccf3f34d217b3d52cb1cd4a912e2536af1ca87ea66d22",
"typeString": "literal_string \"can only retrieve hashes for last 256 blocks\""
},
"value": "can only retrieve hashes for last 256 blocks"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_f7a45d329a3b70387cbccf3f34d217b3d52cb1cd4a912e2536af1ca87ea66d22",
"typeString": "literal_string \"can only retrieve hashes for last 256 blocks\""
}
],
"id": 11221,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
28862,
28863
],
"referencedDeclaration": 28863,
"src": "5474:7:33",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11232,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5474:107:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11233,
"nodeType": "ExpressionStatement",
"src": "5474:107:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11235,
"name": "_block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11204,
"src": "5609:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 11234,
"name": "blockhash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28850,
"src": "5599:9:33",
"typeDescriptions": {
"typeIdentifier": "t_function_blockhash_view$_t_uint256_$returns$_t_bytes32_$",
"typeString": "function (uint256) view returns (bytes32)"
}
},
"id": 11236,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5599:17:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"functionReturnParameters": 11208,
"id": 11237,
"nodeType": "Return",
"src": "5592:24:33"
}
]
},
"documentation": "@notice Return blockhash for a block",
"id": 11239,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "blockHash",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11205,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11204,
"name": "_block",
"nodeType": "VariableDeclaration",
"scope": 11239,
"src": "5296:14:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11203,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5296:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5295:16:33"
},
"returnParameters": {
"id": 11208,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11207,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11239,
"src": "5333:7:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 11206,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "5333:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5332:9:33"
},
"scope": 11366,
"src": "5277:346:33",
"stateMutability": "view",
"superFunction": 10968,
"visibility": "public"
},
{
"body": {
"id": 11250,
"nodeType": "Block",
"src": "5834:50:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 11246,
"name": "_blockHashForRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11025,
"src": "5851:18:33",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
}
},
"id": 11248,
"indexExpression": {
"argumentTypes": null,
"id": 11247,
"name": "_round",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11241,
"src": "5870:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "5851:26:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"functionReturnParameters": 11245,
"id": 11249,
"nodeType": "Return",
"src": "5844:33:33"
}
]
},
"documentation": "@notice Return blockhash for a round\n@param _round Round number\n@return Blockhash for `_round`",
"id": 11251,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "blockHashForRound",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11242,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11241,
"name": "_round",
"nodeType": "VariableDeclaration",
"scope": 11251,
"src": "5788:14:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11240,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5788:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5787:16:33"
},
"returnParameters": {
"id": 11245,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11244,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11251,
"src": "5825:7:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 11243,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "5825:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5824:9:33"
},
"scope": 11366,
"src": "5761:123:33",
"stateMutability": "view",
"superFunction": 10975,
"visibility": "public"
},
{
"body": {
"id": 11272,
"nodeType": "Block",
"src": "5996:357:33",
"statements": [
{
"assignments": [
11257
],
"declarations": [
{
"constant": false,
"id": 11257,
"name": "roundsSinceUpdate",
"nodeType": "VariableDeclaration",
"scope": 11272,
"src": "6072:25:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11256,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6072:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11266,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11264,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "6152:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11261,
"name": "lastRoundLengthUpdateStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11021,
"src": "6115:31:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11258,
"name": "blockNum",
"nodeType": "Identifier",
"overloadedDeclarations": [
11202
],
"referencedDeclaration": 11202,
"src": "6100:8:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11259,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6100:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11260,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 28297,
"src": "6100:14:33",
"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": 11262,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6100:47:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11263,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 28356,
"src": "6100:51:33",
"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": 11265,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6100:64:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6072:92:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11269,
"name": "roundsSinceUpdate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11257,
"src": "6328:17:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 11267,
"name": "lastRoundLengthUpdateRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11019,
"src": "6297:26:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11268,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 28272,
"src": "6297:30:33",
"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": 11270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6297:49:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 11255,
"id": 11271,
"nodeType": "Return",
"src": "6290:56:33"
}
]
},
"documentation": "@notice Return current round",
"id": 11273,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "currentRound",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11252,
"nodeType": "ParameterList",
"parameters": [],
"src": "5963:2:33"
},
"returnParameters": {
"id": 11255,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11254,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11273,
"src": "5987:7:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11253,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5987:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5986:9:33"
},
"scope": 11366,
"src": "5942:411:33",
"stateMutability": "view",
"superFunction": 10980,
"visibility": "public"
},
{
"body": {
"id": 11297,
"nodeType": "Block",
"src": "6490:422:33",
"statements": [
{
"assignments": [
11279
],
"declarations": [
{
"constant": false,
"id": 11279,
"name": "roundsSinceUpdate",
"nodeType": "VariableDeclaration",
"scope": 11297,
"src": "6566:25:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11278,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6566:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11288,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11286,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "6646:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11283,
"name": "lastRoundLengthUpdateStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11021,
"src": "6609:31:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11280,
"name": "blockNum",
"nodeType": "Identifier",
"overloadedDeclarations": [
11202
],
"referencedDeclaration": 11202,
"src": "6594:8:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11281,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6594:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11282,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 28297,
"src": "6594:14:33",
"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": 11284,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6594:47:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11285,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 28356,
"src": "6594:51:33",
"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": 11287,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6594:64:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6566:92:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11293,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "6892:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 11291,
"name": "roundsSinceUpdate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11279,
"src": "6870:17:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11292,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mul",
"nodeType": "MemberAccess",
"referencedDeclaration": 28331,
"src": "6870:21:33",
"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": 11294,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6870:34:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 11289,
"name": "lastRoundLengthUpdateStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11021,
"src": "6834:31:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11290,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 28272,
"src": "6834:35:33",
"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": 11295,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6834:71:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 11277,
"id": 11296,
"nodeType": "Return",
"src": "6827:78:33"
}
]
},
"documentation": "@notice Return start block of current round",
"id": 11298,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "currentRoundStartBlock",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11274,
"nodeType": "ParameterList",
"parameters": [],
"src": "6457:2:33"
},
"returnParameters": {
"id": 11277,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11276,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11298,
"src": "6481:7:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11275,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6481:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6480:9:33"
},
"scope": 11366,
"src": "6426:486:33",
"stateMutability": "view",
"superFunction": 10985,
"visibility": "public"
},
{
"body": {
"id": 11308,
"nodeType": "Block",
"src": "7049:62:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11306,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11303,
"name": "lastInitializedRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11017,
"src": "7066:20:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11304,
"name": "currentRound",
"nodeType": "Identifier",
"overloadedDeclarations": [
11273
],
"referencedDeclaration": 11273,
"src": "7090:12:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11305,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7090:14:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7066:38:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 11302,
"id": 11307,
"nodeType": "Return",
"src": "7059:45:33"
}
]
},
"documentation": "@notice Check if current round is initialized",
"id": 11309,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "currentRoundInitialized",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11299,
"nodeType": "ParameterList",
"parameters": [],
"src": "7019:2:33"
},
"returnParameters": {
"id": 11302,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11301,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11309,
"src": "7043:4:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 11300,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "7043:4:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7042:6:33"
},
"scope": 11366,
"src": "6987:124:33",
"stateMutability": "view",
"superFunction": 10990,
"visibility": "public"
},
{
"body": {
"id": 11334,
"nodeType": "Block",
"src": "7261:176:33",
"statements": [
{
"assignments": [
11315
],
"declarations": [
{
"constant": false,
"id": 11315,
"name": "lockedBlocks",
"nodeType": "VariableDeclaration",
"scope": 11334,
"src": "7271:20:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11314,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7271:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11321,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11318,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "7311:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 11319,
"name": "roundLockAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11015,
"src": "7324:15:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 11316,
"name": "MathUtils",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7908,
"src": "7294:9:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_MathUtils_$7908_$",
"typeString": "type(library MathUtils)"
}
},
"id": 11317,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "percOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 7889,
"src": "7294:16:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 11320,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7294:46:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7271:69:33"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11332,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11325,
"name": "currentRoundStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [
11298
],
"referencedDeclaration": 11298,
"src": "7372:22:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11326,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7372:24:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11322,
"name": "blockNum",
"nodeType": "Identifier",
"overloadedDeclarations": [
11202
],
"referencedDeclaration": 11202,
"src": "7357:8:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11323,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7357:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11324,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 28297,
"src": "7357:14:33",
"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": 11327,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7357:40:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11330,
"name": "lockedBlocks",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11315,
"src": "7417:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 11328,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "7401:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11329,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 28297,
"src": "7401:15:33",
"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": 11331,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7401:29:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7357:73:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 11313,
"id": 11333,
"nodeType": "Return",
"src": "7350:80:33"
}
]
},
"documentation": "@notice Check if we are in the lock period of the current round",
"id": 11335,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "currentRoundLocked",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11310,
"nodeType": "ParameterList",
"parameters": [],
"src": "7231:2:33"
},
"returnParameters": {
"id": 11313,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11312,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11335,
"src": "7255:4:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 11311,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "7255:4:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7254:6:33"
},
"scope": 11366,
"src": "7204:233:33",
"stateMutability": "view",
"superFunction": 10995,
"visibility": "public"
},
{
"body": {
"id": 11349,
"nodeType": "Block",
"src": "7569:92:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "426f6e64696e674d616e61676572",
"id": 11344,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7635:16:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_2517d59a36a86548e38734e8ab416f42afff4bca78706a66ad65750dae7f9e37",
"typeString": "literal_string \"BondingManager\""
},
"value": "BondingManager"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_2517d59a36a86548e38734e8ab416f42afff4bca78706a66ad65750dae7f9e37",
"typeString": "literal_string \"BondingManager\""
}
],
"id": 11343,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28853,
"src": "7625:9:33",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 11345,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7625:27:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"argumentTypes": null,
"id": 11341,
"name": "controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 172,
"src": "7602:10:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IController_$148",
"typeString": "contract IController"
}
},
"id": 11342,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getContract",
"nodeType": "MemberAccess",
"referencedDeclaration": 147,
"src": "7602:22:33",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32) view external returns (address)"
}
},
"id": 11346,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7602:51:33",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 11340,
"name": "IBondingManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3936,
"src": "7586:15:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IBondingManager_$3936_$",
"typeString": "type(contract IBondingManager)"
}
},
"id": 11347,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7586:68:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IBondingManager_$3936",
"typeString": "contract IBondingManager"
}
},
"functionReturnParameters": 11339,
"id": 11348,
"nodeType": "Return",
"src": "7579:75:33"
}
]
},
"documentation": "@dev Return BondingManager interface",
"id": 11350,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "bondingManager",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11336,
"nodeType": "ParameterList",
"parameters": [],
"src": "7526:2:33"
},
"returnParameters": {
"id": 11339,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11338,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11350,
"src": "7552:15:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IBondingManager_$3936",
"typeString": "contract IBondingManager"
},
"typeName": {
"contractScope": null,
"id": 11337,
"name": "IBondingManager",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3936,
"src": "7552:15:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IBondingManager_$3936",
"typeString": "contract IBondingManager"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7551:17:33"
},
"scope": 11366,
"src": "7503:158:33",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 11364,
"nodeType": "Block",
"src": "7769:76:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "4d696e746572",
"id": 11359,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7827:8:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6e58ad548d72b425ea94c15f453bf26caddb061d82b2551db7fdd3cefe0e9940",
"typeString": "literal_string \"Minter\""
},
"value": "Minter"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_6e58ad548d72b425ea94c15f453bf26caddb061d82b2551db7fdd3cefe0e9940",
"typeString": "literal_string \"Minter\""
}
],
"id": 11358,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28853,
"src": "7817:9:33",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 11360,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7817:19:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"argumentTypes": null,
"id": 11356,
"name": "controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 172,
"src": "7794:10:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IController_$148",
"typeString": "contract IController"
}
},
"id": 11357,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getContract",
"nodeType": "MemberAccess",
"referencedDeclaration": 147,
"src": "7794:22:33",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32) view external returns (address)"
}
},
"id": 11361,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7794:43:33",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 11355,
"name": "IMinter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27164,
"src": "7786:7:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IMinter_$27164_$",
"typeString": "type(contract IMinter)"
}
},
"id": 11362,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7786:52:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IMinter_$27164",
"typeString": "contract IMinter"
}
},
"functionReturnParameters": 11354,
"id": 11363,
"nodeType": "Return",
"src": "7779:59:33"
}
]
},
"documentation": "@dev Return Minter interface",
"id": 11365,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "minter",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11351,
"nodeType": "ParameterList",
"parameters": [],
"src": "7734:2:33"
},
"returnParameters": {
"id": 11354,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11353,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11365,
"src": "7760:7:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IMinter_$27164",
"typeString": "contract IMinter"
},
"typeName": {
"contractScope": null,
"id": 11352,
"name": "IMinter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 27164,
"src": "7760:7:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IMinter_$27164",
"typeString": "contract IMinter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7759:9:33"
},
"scope": 11366,
"src": "7719:126:33",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 11367,
"src": "404:7443:33"
}
],
"src": "0:7848:33"
},
"legacyAST": {
"absolutePath": "/Users/nico/Desktop/livepeer/protocol/contracts/rounds/RoundsManager.sol",
"exportedSymbols": {
"RoundsManager": [
11366
]
},
"id": 11367,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 10998,
"literals": [
"solidity",
"^",
"0.5",
".11"
],
"nodeType": "PragmaDirective",
"src": "0:24:33"
},
{
"absolutePath": "/Users/nico/Desktop/livepeer/protocol/contracts/ManagerProxyTarget.sol",
"file": "../ManagerProxyTarget.sol",
"id": 10999,
"nodeType": "ImportDirective",
"scope": 11367,
"sourceUnit": 305,
"src": "26:35:33",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/nico/Desktop/livepeer/protocol/contracts/rounds/IRoundsManager.sol",
"file": "./IRoundsManager.sol",
"id": 11000,
"nodeType": "ImportDirective",
"scope": 11367,
"sourceUnit": 10997,
"src": "62:30:33",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/nico/Desktop/livepeer/protocol/contracts/bonding/IBondingManager.sol",
"file": "../bonding/IBondingManager.sol",
"id": 11001,
"nodeType": "ImportDirective",
"scope": 11367,
"sourceUnit": 3937,
"src": "93:40:33",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/nico/Desktop/livepeer/protocol/contracts/token/IMinter.sol",
"file": "../token/IMinter.sol",
"id": 11002,
"nodeType": "ImportDirective",
"scope": 11367,
"sourceUnit": 27165,
"src": "134:30:33",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/nico/Desktop/livepeer/protocol/contracts/libraries/MathUtils.sol",
"file": "../libraries/MathUtils.sol",
"id": 11003,
"nodeType": "ImportDirective",
"scope": 11367,
"sourceUnit": 7909,
"src": "165:36:33",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"file": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"id": 11004,
"nodeType": "ImportDirective",
"scope": 11367,
"sourceUnit": 28379,
"src": "203:59:33",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11005,
"name": "ManagerProxyTarget",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 304,
"src": "430:18:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ManagerProxyTarget_$304",
"typeString": "contract ManagerProxyTarget"
}
},
"id": 11006,
"nodeType": "InheritanceSpecifier",
"src": "430:18:33"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11007,
"name": "IRoundsManager",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 10996,
"src": "450:14:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IRoundsManager_$10996",
"typeString": "contract IRoundsManager"
}
},
"id": 11008,
"nodeType": "InheritanceSpecifier",
"src": "450:14:33"
}
],
"contractDependencies": [
164,
254,
304,
10996
],
"contractKind": "contract",
"documentation": "@title RoundsManager\n@notice Manages round progression and other blockchain time related operations of the Livepeer protocol",
"fullyImplemented": true,
"id": 11366,
"linearizedBaseContracts": [
11366,
10996,
304,
254,
164
],
"name": "RoundsManager",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 11011,
"libraryName": {
"contractScope": null,
"id": 11009,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 28378,
"src": "477:8:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$28378",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "471:27:33",
"typeName": {
"id": 11010,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "490:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": false,
"id": 11013,
"name": "roundLength",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "534:26:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11012,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "534:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 11015,
"name": "roundLockAmount",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "921:30:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11014,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "921:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 11017,
"name": "lastInitializedRound",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "1072:35:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11016,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1072:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 11019,
"name": "lastRoundLengthUpdateRound",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "1164:41:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11018,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1164:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 11021,
"name": "lastRoundLengthUpdateStartBlock",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "1281:46:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11020,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1281:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 11025,
"name": "_blockHashForRound",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "1390:56:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
},
"typeName": {
"id": 11024,
"keyType": {
"id": 11022,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1399:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "1390:28:33",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
},
"valueType": {
"id": 11023,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1410:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11029,
"name": "lipUpgradeRound",
"nodeType": "VariableDeclaration",
"scope": 11366,
"src": "1649:51:33",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"typeName": {
"id": 11028,
"keyType": {
"id": 11026,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1658:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "1649:28:33",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"valueType": {
"id": 11027,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1669:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 11037,
"nodeType": "Block",
"src": "2286:2:33",
"statements": []
},
"documentation": "@notice RoundsManager constructor. Only invokes constructor of base Manager contract with provided Controller address\n@dev This constructor will not initialize any state variables besides `controller`. The following setter functions\nshould be used to initialize state variables post-deployment:\n- setRoundLength()\n- setRoundLockAmount()\n@param _controller Address of Controller that this contract will be registered with",
"id": 11038,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 11034,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11031,
"src": "2273:11:33",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 11035,
"modifierName": {
"argumentTypes": null,
"id": 11033,
"name": "Manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 254,
"src": "2265:7:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Manager_$254_$",
"typeString": "type(contract Manager)"
}
},
"nodeType": "ModifierInvocation",
"src": "2265:20:33"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11032,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11031,
"name": "_controller",
"nodeType": "VariableDeclaration",
"scope": 11038,
"src": "2237:19:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 11030,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2237:7:33",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2236:21:33"
},
"returnParameters": {
"id": 11036,
"nodeType": "ParameterList",
"parameters": [],
"src": "2286:0:33"
},
"scope": 11366,
"src": "2225:63:33",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 11090,
"nodeType": "Block",
"src": "2506:810:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11048,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11046,
"name": "_roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11040,
"src": "2524:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 11047,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2539:1:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2524:16:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "726f756e64206c656e6774682063616e6e6f742062652030",
"id": 11049,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2542:26:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_971dc2ea23e68f234420250330e2772d778b5a3747e4b89633a4525391e5965b",
"typeString": "literal_string \"round length cannot be 0\""
},
"value": "round length cannot be 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_971dc2ea23e68f234420250330e2772d778b5a3747e4b89633a4525391e5965b",
"typeString": "literal_string \"round length cannot be 0\""
}
],
"id": 11045,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
28862,
28863
],
"referencedDeclaration": 28863,
"src": "2516:7:33",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11050,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2516:53:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11051,
"nodeType": "ExpressionStatement",
"src": "2516:53:33"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11054,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11052,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "2584:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 11053,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2599:1:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2584:16:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 11084,
"nodeType": "Block",
"src": "2944:320:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 11073,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11070,
"name": "lastRoundLengthUpdateRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11019,
"src": "3098:26:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11071,
"name": "currentRound",
"nodeType": "Identifier",
"overloadedDeclarations": [
11273
],
"referencedDeclaration": 11273,
"src": "3127:12:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11072,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3127:14:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3098:43:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11074,
"nodeType": "ExpressionStatement",
"src": "3098:43:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11078,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11075,
"name": "lastRoundLengthUpdateStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11021,
"src": "3155:31:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11076,
"name": "currentRoundStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [
11298
],
"referencedDeclaration": 11298,
"src": "3189:22:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11077,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3189:24:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3155:58:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11079,
"nodeType": "ExpressionStatement",
"src": "3155:58:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11082,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11080,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "3227:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 11081,
"name": "_roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11040,
"src": "3241:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3227:26:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11083,
"nodeType": "ExpressionStatement",
"src": "3227:26:33"
}
]
},
"id": 11085,
"nodeType": "IfStatement",
"src": "2580:684:33",
"trueBody": {
"id": 11069,
"nodeType": "Block",
"src": "2602:336:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 11057,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11055,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "2772:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 11056,
"name": "_roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11040,
"src": "2786:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2772:26:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11058,
"nodeType": "ExpressionStatement",
"src": "2772:26:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11062,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11059,
"name": "lastRoundLengthUpdateRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11019,
"src": "2812:26:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11060,
"name": "currentRound",
"nodeType": "Identifier",
"overloadedDeclarations": [
11273
],
"referencedDeclaration": 11273,
"src": "2841:12:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11061,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2841:14:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2812:43:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11063,
"nodeType": "ExpressionStatement",
"src": "2812:43:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11067,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11064,
"name": "lastRoundLengthUpdateStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11021,
"src": "2869:31:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11065,
"name": "currentRoundStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [
11298
],
"referencedDeclaration": 11298,
"src": "2903:22:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11066,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2903:24:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2869:58:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11068,
"nodeType": "ExpressionStatement",
"src": "2869:58:33"
}
]
}
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "726f756e644c656e677468",
"id": 11087,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3295:13:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_1c401584e7969bf658ddc956ef5c1ed10fe9f27c9c8486a19bc5db738543161c",
"typeString": "literal_string \"roundLength\""
},
"value": "roundLength"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_1c401584e7969bf658ddc956ef5c1ed10fe9f27c9c8486a19bc5db738543161c",
"typeString": "literal_string \"roundLength\""
}
],
"id": 11086,
"name": "ParameterUpdate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 158,
"src": "3279:15:33",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory)"
}
},
"id": 11088,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3279:30:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11089,
"nodeType": "EmitStatement",
"src": "3274:35:33"
}
]
},
"documentation": "@notice Set round length. Only callable by the controller owner\n@param _roundLength Round length in blocks",
"id": 11091,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 11043,
"modifierName": {
"argumentTypes": null,
"id": 11042,
"name": "onlyControllerOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 200,
"src": "2486:19:33",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "2486:19:33"
}
],
"name": "setRoundLength",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11041,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11040,
"name": "_roundLength",
"nodeType": "VariableDeclaration",
"scope": 11091,
"src": "2455:20:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11039,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2455:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2454:22:33"
},
"returnParameters": {
"id": 11044,
"nodeType": "ParameterList",
"parameters": [],
"src": "2506:0:33"
},
"scope": 11366,
"src": "2431:885:33",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 11114,
"nodeType": "Block",
"src": "3588:206:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11101,
"name": "_roundLockAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11093,
"src": "3626:16:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 11099,
"name": "MathUtils",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7908,
"src": "3606:9:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_MathUtils_$7908_$",
"typeString": "type(library MathUtils)"
}
},
"id": 11100,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "validPerc",
"nodeType": "MemberAccess",
"referencedDeclaration": 7848,
"src": "3606:19:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_bool_$",
"typeString": "function (uint256) pure returns (bool)"
}
},
"id": 11102,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3606:37:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "726f756e64206c6f636b20616d6f756e74206d75737420626520612076616c69642070657263656e74616765",
"id": 11103,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3645:46:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_96adb1afe76881d224da1e31bfc0872e0dfff03697b772ac8d6990c7c31817dc",
"typeString": "literal_string \"round lock amount must be a valid percentage\""
},
"value": "round lock amount must be a valid percentage"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_96adb1afe76881d224da1e31bfc0872e0dfff03697b772ac8d6990c7c31817dc",
"typeString": "literal_string \"round lock amount must be a valid percentage\""
}
],
"id": 11098,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
28862,
28863
],
"referencedDeclaration": 28863,
"src": "3598:7:33",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11104,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3598:94:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11105,
"nodeType": "ExpressionStatement",
"src": "3598:94:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11108,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11106,
"name": "roundLockAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11015,
"src": "3703:15:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 11107,
"name": "_roundLockAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11093,
"src": "3721:16:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3703:34:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11109,
"nodeType": "ExpressionStatement",
"src": "3703:34:33"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "726f756e644c6f636b416d6f756e74",
"id": 11111,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3769:17:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_136718dbf37afd14697d21880ed8ae94abd2698e8ab7679bff4265cb01b1456a",
"typeString": "literal_string \"roundLockAmount\""
},
"value": "roundLockAmount"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_136718dbf37afd14697d21880ed8ae94abd2698e8ab7679bff4265cb01b1456a",
"typeString": "literal_string \"roundLockAmount\""
}
],
"id": 11110,
"name": "ParameterUpdate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 158,
"src": "3753:15:33",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory)"
}
},
"id": 11112,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3753:34:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11113,
"nodeType": "EmitStatement",
"src": "3748:39:33"
}
]
},
"documentation": "@notice Set round lock amount. Only callable by the controller owner\n@param _roundLockAmount Round lock amount as a % of the number of blocks in a round",
"id": 11115,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 11096,
"modifierName": {
"argumentTypes": null,
"id": 11095,
"name": "onlyControllerOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 200,
"src": "3568:19:33",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "3568:19:33"
}
],
"name": "setRoundLockAmount",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11094,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11093,
"name": "_roundLockAmount",
"nodeType": "VariableDeclaration",
"scope": 11115,
"src": "3533:24:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11092,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3533:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3532:26:33"
},
"returnParameters": {
"id": 11097,
"nodeType": "ParameterList",
"parameters": [],
"src": "3588:0:33"
},
"scope": 11366,
"src": "3505:289:33",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 11167,
"nodeType": "Block",
"src": "3955:681:33",
"statements": [
{
"assignments": [
11121
],
"declarations": [
{
"constant": false,
"id": 11121,
"name": "currRound",
"nodeType": "VariableDeclaration",
"scope": 11167,
"src": "3965:17:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11120,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3965:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11124,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11122,
"name": "currentRound",
"nodeType": "Identifier",
"overloadedDeclarations": [
11273
],
"referencedDeclaration": 11273,
"src": "3985:12:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11123,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3985:14:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3965:34:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11128,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11126,
"name": "lastInitializedRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11017,
"src": "4075:20:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 11127,
"name": "currRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11121,
"src": "4098:9:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4075:32:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "726f756e6420616c726561647920696e697469616c697a6564",
"id": 11129,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4109:27:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_288b5f4be5b8f91c83fdf535f5cec6e55292f93c109fb2c0a8f2dca6908365c7",
"typeString": "literal_string \"round already initialized\""
},
"value": "round already initialized"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_288b5f4be5b8f91c83fdf535f5cec6e55292f93c109fb2c0a8f2dca6908365c7",
"typeString": "literal_string \"round already initialized\""
}
],
"id": 11125,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
28862,
28863
],
"referencedDeclaration": 28863,
"src": "4067:7:33",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11130,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4067:70:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11131,
"nodeType": "ExpressionStatement",
"src": "4067:70:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 11132,
"name": "lastInitializedRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11017,
"src": "4192:20:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 11133,
"name": "currRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11121,
"src": "4215:9:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4192:32:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11135,
"nodeType": "ExpressionStatement",
"src": "4192:32:33"
},
{
"assignments": [
11137
],
"declarations": [
{
"constant": false,
"id": 11137,
"name": "roundBlockHash",
"nodeType": "VariableDeclaration",
"scope": 11167,
"src": "4272:22:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 11136,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "4272:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11145,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 11142,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4322:1:33",
"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,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11139,
"name": "blockNum",
"nodeType": "Identifier",
"overloadedDeclarations": [
11202
],
"referencedDeclaration": 11202,
"src": "4307:8:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11140,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4307:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11141,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 28297,
"src": "4307:14:33",
"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": 11143,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4307:17:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 11138,
"name": "blockHash",
"nodeType": "Identifier",
"overloadedDeclarations": [
11239
],
"referencedDeclaration": 11239,
"src": "4297:9:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$",
"typeString": "function (uint256) view returns (bytes32)"
}
},
"id": 11144,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4297:28:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4272:53:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11150,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 11146,
"name": "_blockHashForRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11025,
"src": "4335:18:33",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
}
},
"id": 11148,
"indexExpression": {
"argumentTypes": null,
"id": 11147,
"name": "currRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11121,
"src": "4354:9:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "4335:29:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 11149,
"name": "roundBlockHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11137,
"src": "4367:14:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "4335:46:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 11151,
"nodeType": "ExpressionStatement",
"src": "4335:46:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11152,
"name": "bondingManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11350,
"src": "4439:14:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IBondingManager_$3936_$",
"typeString": "function () view returns (contract IBondingManager)"
}
},
"id": 11153,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4439:16:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IBondingManager_$3936",
"typeString": "contract IBondingManager"
}
},
"id": 11154,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCurrentRoundTotalActiveStake",
"nodeType": "MemberAccess",
"referencedDeclaration": 3911,
"src": "4439:48:33",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
"typeString": "function () external"
}
},
"id": 11155,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4439:50:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11156,
"nodeType": "ExpressionStatement",
"src": "4439:50:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11157,
"name": "minter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11365,
"src": "4545:6:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IMinter_$27164_$",
"typeString": "function () view returns (contract IMinter)"
}
},
"id": 11158,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4545:8:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IMinter_$27164",
"typeString": "contract IMinter"
}
},
"id": 11159,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCurrentRewardTokens",
"nodeType": "MemberAccess",
"referencedDeclaration": 27148,
"src": "4545:31:33",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
"typeString": "function () external"
}
},
"id": 11160,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4545:33:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11161,
"nodeType": "ExpressionStatement",
"src": "4545:33:33"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11163,
"name": "currRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11121,
"src": "4603:9:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 11164,
"name": "roundBlockHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11137,
"src": "4614:14:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 11162,
"name": "NewRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10946,
"src": "4594:8:33",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bytes32_$returns$__$",
"typeString": "function (uint256,bytes32)"
}
},
"id": 11165,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4594:35:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11166,
"nodeType": "EmitStatement",
"src": "4589:40:33"
}
]
},
"documentation": "@notice Initialize the current round. Called once at the start of any round",
"id": 11168,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 11118,
"modifierName": {
"argumentTypes": null,
"id": 11117,
"name": "whenSystemNotPaused",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 212,
"src": "3935:19:33",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "3935:19:33"
}
],
"name": "initializeRound",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11116,
"nodeType": "ParameterList",
"parameters": [],
"src": "3923:2:33"
},
"returnParameters": {
"id": 11119,
"nodeType": "ParameterList",
"parameters": [],
"src": "3955:0:33"
},
"scope": 11366,
"src": "3899:737:33",
"stateMutability": "nonpayable",
"superFunction": 10949,
"visibility": "external"
},
{
"body": {
"id": 11192,
"nodeType": "Block",
"src": "4935:125:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11182,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 11178,
"name": "lipUpgradeRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11029,
"src": "4953:15:33",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 11180,
"indexExpression": {
"argumentTypes": null,
"id": 11179,
"name": "_lip",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11170,
"src": "4969:4:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4953:21:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 11181,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4978:1:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4953:26:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4c4950207570677261646520726f756e6420616c726561647920736574",
"id": 11183,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4981:31:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8fa9b3e47a4c212b7a0e2c32675fd2c558d462d8cd05fae907bac72879806196",
"typeString": "literal_string \"LIP upgrade round already set\""
},
"value": "LIP upgrade round already set"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8fa9b3e47a4c212b7a0e2c32675fd2c558d462d8cd05fae907bac72879806196",
"typeString": "literal_string \"LIP upgrade round already set\""
}
],
"id": 11177,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
28862,
28863
],
"referencedDeclaration": 28863,
"src": "4945:7:33",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11184,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4945:68:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11185,
"nodeType": "ExpressionStatement",
"src": "4945:68:33"
},
{
"expression": {
"argumentTypes": null,
"id": 11190,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 11186,
"name": "lipUpgradeRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11029,
"src": "5023:15:33",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 11188,
"indexExpression": {
"argumentTypes": null,
"id": 11187,
"name": "_lip",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11170,
"src": "5039:4:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "5023:21:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 11189,
"name": "_round",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11172,
"src": "5047:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5023:30:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11191,
"nodeType": "ExpressionStatement",
"src": "5023:30:33"
}
]
},
"documentation": "@notice setLIPUpgradeRound sets the round an LIP upgrade would become active.\n@param _lip the LIP number.\n@param _round (optional) the round in which the LIP becomes active",
"id": 11193,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 11175,
"modifierName": {
"argumentTypes": null,
"id": 11174,
"name": "onlyControllerOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 200,
"src": "4915:19:33",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "4915:19:33"
}
],
"name": "setLIPUpgradeRound",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11173,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11170,
"name": "_lip",
"nodeType": "VariableDeclaration",
"scope": 11193,
"src": "4876:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11169,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4876:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11172,
"name": "_round",
"nodeType": "VariableDeclaration",
"scope": 11193,
"src": "4890:14:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11171,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4890:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4875:30:33"
},
"returnParameters": {
"id": 11176,
"nodeType": "ParameterList",
"parameters": [],
"src": "4935:0:33"
},
"scope": 11366,
"src": "4848:212:33",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 11201,
"nodeType": "Block",
"src": "5175:36:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 11198,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28849,
"src": "5192:5:33",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 11199,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "number",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5192:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 11197,
"id": 11200,
"nodeType": "Return",
"src": "5185:19:33"
}
]
},
"documentation": "@notice Return current block number",
"id": 11202,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "blockNum",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11194,
"nodeType": "ParameterList",
"parameters": [],
"src": "5142:2:33"
},
"returnParameters": {
"id": 11197,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11196,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11202,
"src": "5166:7:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11195,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5166:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5165:9:33"
},
"scope": 11366,
"src": "5125:86:33",
"stateMutability": "view",
"superFunction": 10961,
"visibility": "public"
},
{
"body": {
"id": 11238,
"nodeType": "Block",
"src": "5342:281:33",
"statements": [
{
"assignments": [
11210
],
"declarations": [
{
"constant": false,
"id": 11210,
"name": "currentBlock",
"nodeType": "VariableDeclaration",
"scope": 11238,
"src": "5352:20:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11209,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5352:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11213,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11211,
"name": "blockNum",
"nodeType": "Identifier",
"overloadedDeclarations": [
11202
],
"referencedDeclaration": 11202,
"src": "5375:8:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11212,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5375:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5352:33:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11217,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11215,
"name": "_block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11204,
"src": "5403:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 11216,
"name": "currentBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11210,
"src": "5412:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5403:21:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "63616e206f6e6c79207265747269657665207061737420626c6f636b20686173686573",
"id": 11218,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5426:37:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_954f82202aa8c55851f45963f6e3a3f5838e2f61793fa3bad81ff962d2ecd9ed",
"typeString": "literal_string \"can only retrieve past block hashes\""
},
"value": "can only retrieve past block hashes"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_954f82202aa8c55851f45963f6e3a3f5838e2f61793fa3bad81ff962d2ecd9ed",
"typeString": "literal_string \"can only retrieve past block hashes\""
}
],
"id": 11214,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
28862,
28863
],
"referencedDeclaration": 28863,
"src": "5395:7:33",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5395:69:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11220,
"nodeType": "ExpressionStatement",
"src": "5395:69:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 11230,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11224,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11222,
"name": "currentBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11210,
"src": "5482:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"hexValue": "323536",
"id": 11223,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5497:3:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_256_by_1",
"typeString": "int_const 256"
},
"value": "256"
},
"src": "5482:18:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11229,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11225,
"name": "_block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11204,
"src": "5504:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11228,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11226,
"name": "currentBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11210,
"src": "5514:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "323536",
"id": 11227,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5529:3:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_256_by_1",
"typeString": "int_const 256"
},
"value": "256"
},
"src": "5514:18:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5504:28:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "5482:50:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "63616e206f6e6c792072657472696576652068617368657320666f72206c6173742032353620626c6f636b73",
"id": 11231,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5534:46:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f7a45d329a3b70387cbccf3f34d217b3d52cb1cd4a912e2536af1ca87ea66d22",
"typeString": "literal_string \"can only retrieve hashes for last 256 blocks\""
},
"value": "can only retrieve hashes for last 256 blocks"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_f7a45d329a3b70387cbccf3f34d217b3d52cb1cd4a912e2536af1ca87ea66d22",
"typeString": "literal_string \"can only retrieve hashes for last 256 blocks\""
}
],
"id": 11221,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
28862,
28863
],
"referencedDeclaration": 28863,
"src": "5474:7:33",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11232,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5474:107:33",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11233,
"nodeType": "ExpressionStatement",
"src": "5474:107:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11235,
"name": "_block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11204,
"src": "5609:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 11234,
"name": "blockhash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28850,
"src": "5599:9:33",
"typeDescriptions": {
"typeIdentifier": "t_function_blockhash_view$_t_uint256_$returns$_t_bytes32_$",
"typeString": "function (uint256) view returns (bytes32)"
}
},
"id": 11236,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5599:17:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"functionReturnParameters": 11208,
"id": 11237,
"nodeType": "Return",
"src": "5592:24:33"
}
]
},
"documentation": "@notice Return blockhash for a block",
"id": 11239,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "blockHash",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11205,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11204,
"name": "_block",
"nodeType": "VariableDeclaration",
"scope": 11239,
"src": "5296:14:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11203,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5296:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5295:16:33"
},
"returnParameters": {
"id": 11208,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11207,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11239,
"src": "5333:7:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 11206,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "5333:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5332:9:33"
},
"scope": 11366,
"src": "5277:346:33",
"stateMutability": "view",
"superFunction": 10968,
"visibility": "public"
},
{
"body": {
"id": 11250,
"nodeType": "Block",
"src": "5834:50:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 11246,
"name": "_blockHashForRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11025,
"src": "5851:18:33",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
}
},
"id": 11248,
"indexExpression": {
"argumentTypes": null,
"id": 11247,
"name": "_round",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11241,
"src": "5870:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "5851:26:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"functionReturnParameters": 11245,
"id": 11249,
"nodeType": "Return",
"src": "5844:33:33"
}
]
},
"documentation": "@notice Return blockhash for a round\n@param _round Round number\n@return Blockhash for `_round`",
"id": 11251,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "blockHashForRound",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11242,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11241,
"name": "_round",
"nodeType": "VariableDeclaration",
"scope": 11251,
"src": "5788:14:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11240,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5788:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5787:16:33"
},
"returnParameters": {
"id": 11245,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11244,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11251,
"src": "5825:7:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 11243,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "5825:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5824:9:33"
},
"scope": 11366,
"src": "5761:123:33",
"stateMutability": "view",
"superFunction": 10975,
"visibility": "public"
},
{
"body": {
"id": 11272,
"nodeType": "Block",
"src": "5996:357:33",
"statements": [
{
"assignments": [
11257
],
"declarations": [
{
"constant": false,
"id": 11257,
"name": "roundsSinceUpdate",
"nodeType": "VariableDeclaration",
"scope": 11272,
"src": "6072:25:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11256,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6072:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11266,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11264,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "6152:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11261,
"name": "lastRoundLengthUpdateStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11021,
"src": "6115:31:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11258,
"name": "blockNum",
"nodeType": "Identifier",
"overloadedDeclarations": [
11202
],
"referencedDeclaration": 11202,
"src": "6100:8:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11259,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6100:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11260,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 28297,
"src": "6100:14:33",
"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": 11262,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6100:47:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11263,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 28356,
"src": "6100:51:33",
"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": 11265,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6100:64:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6072:92:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11269,
"name": "roundsSinceUpdate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11257,
"src": "6328:17:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 11267,
"name": "lastRoundLengthUpdateRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11019,
"src": "6297:26:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11268,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 28272,
"src": "6297:30:33",
"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": 11270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6297:49:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 11255,
"id": 11271,
"nodeType": "Return",
"src": "6290:56:33"
}
]
},
"documentation": "@notice Return current round",
"id": 11273,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "currentRound",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11252,
"nodeType": "ParameterList",
"parameters": [],
"src": "5963:2:33"
},
"returnParameters": {
"id": 11255,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11254,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11273,
"src": "5987:7:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11253,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5987:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5986:9:33"
},
"scope": 11366,
"src": "5942:411:33",
"stateMutability": "view",
"superFunction": 10980,
"visibility": "public"
},
{
"body": {
"id": 11297,
"nodeType": "Block",
"src": "6490:422:33",
"statements": [
{
"assignments": [
11279
],
"declarations": [
{
"constant": false,
"id": 11279,
"name": "roundsSinceUpdate",
"nodeType": "VariableDeclaration",
"scope": 11297,
"src": "6566:25:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11278,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6566:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11288,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11286,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "6646:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11283,
"name": "lastRoundLengthUpdateStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11021,
"src": "6609:31:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11280,
"name": "blockNum",
"nodeType": "Identifier",
"overloadedDeclarations": [
11202
],
"referencedDeclaration": 11202,
"src": "6594:8:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11281,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6594:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11282,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 28297,
"src": "6594:14:33",
"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": 11284,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6594:47:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11285,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 28356,
"src": "6594:51:33",
"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": 11287,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6594:64:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6566:92:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11293,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "6892:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 11291,
"name": "roundsSinceUpdate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11279,
"src": "6870:17:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11292,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mul",
"nodeType": "MemberAccess",
"referencedDeclaration": 28331,
"src": "6870:21:33",
"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": 11294,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6870:34:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 11289,
"name": "lastRoundLengthUpdateStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11021,
"src": "6834:31:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11290,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 28272,
"src": "6834:35:33",
"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": 11295,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6834:71:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 11277,
"id": 11296,
"nodeType": "Return",
"src": "6827:78:33"
}
]
},
"documentation": "@notice Return start block of current round",
"id": 11298,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "currentRoundStartBlock",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11274,
"nodeType": "ParameterList",
"parameters": [],
"src": "6457:2:33"
},
"returnParameters": {
"id": 11277,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11276,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11298,
"src": "6481:7:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11275,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6481:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6480:9:33"
},
"scope": 11366,
"src": "6426:486:33",
"stateMutability": "view",
"superFunction": 10985,
"visibility": "public"
},
{
"body": {
"id": 11308,
"nodeType": "Block",
"src": "7049:62:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11306,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 11303,
"name": "lastInitializedRound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11017,
"src": "7066:20:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11304,
"name": "currentRound",
"nodeType": "Identifier",
"overloadedDeclarations": [
11273
],
"referencedDeclaration": 11273,
"src": "7090:12:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11305,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7090:14:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7066:38:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 11302,
"id": 11307,
"nodeType": "Return",
"src": "7059:45:33"
}
]
},
"documentation": "@notice Check if current round is initialized",
"id": 11309,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "currentRoundInitialized",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11299,
"nodeType": "ParameterList",
"parameters": [],
"src": "7019:2:33"
},
"returnParameters": {
"id": 11302,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11301,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11309,
"src": "7043:4:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 11300,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "7043:4:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7042:6:33"
},
"scope": 11366,
"src": "6987:124:33",
"stateMutability": "view",
"superFunction": 10990,
"visibility": "public"
},
{
"body": {
"id": 11334,
"nodeType": "Block",
"src": "7261:176:33",
"statements": [
{
"assignments": [
11315
],
"declarations": [
{
"constant": false,
"id": 11315,
"name": "lockedBlocks",
"nodeType": "VariableDeclaration",
"scope": 11334,
"src": "7271:20:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11314,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7271:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11321,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11318,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "7311:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 11319,
"name": "roundLockAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11015,
"src": "7324:15:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 11316,
"name": "MathUtils",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7908,
"src": "7294:9:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_MathUtils_$7908_$",
"typeString": "type(library MathUtils)"
}
},
"id": 11317,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "percOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 7889,
"src": "7294:16:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 11320,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7294:46:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7271:69:33"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11332,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11325,
"name": "currentRoundStartBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [
11298
],
"referencedDeclaration": 11298,
"src": "7372:22:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11326,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7372:24:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11322,
"name": "blockNum",
"nodeType": "Identifier",
"overloadedDeclarations": [
11202
],
"referencedDeclaration": 11202,
"src": "7357:8:33",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 11323,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7357:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11324,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 28297,
"src": "7357:14:33",
"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": 11327,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7357:40:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11330,
"name": "lockedBlocks",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11315,
"src": "7417:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 11328,
"name": "roundLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11013,
"src": "7401:11:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11329,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 28297,
"src": "7401:15:33",
"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": 11331,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7401:29:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7357:73:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 11313,
"id": 11333,
"nodeType": "Return",
"src": "7350:80:33"
}
]
},
"documentation": "@notice Check if we are in the lock period of the current round",
"id": 11335,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "currentRoundLocked",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11310,
"nodeType": "ParameterList",
"parameters": [],
"src": "7231:2:33"
},
"returnParameters": {
"id": 11313,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11312,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11335,
"src": "7255:4:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 11311,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "7255:4:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7254:6:33"
},
"scope": 11366,
"src": "7204:233:33",
"stateMutability": "view",
"superFunction": 10995,
"visibility": "public"
},
{
"body": {
"id": 11349,
"nodeType": "Block",
"src": "7569:92:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "426f6e64696e674d616e61676572",
"id": 11344,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7635:16:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_2517d59a36a86548e38734e8ab416f42afff4bca78706a66ad65750dae7f9e37",
"typeString": "literal_string \"BondingManager\""
},
"value": "BondingManager"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_2517d59a36a86548e38734e8ab416f42afff4bca78706a66ad65750dae7f9e37",
"typeString": "literal_string \"BondingManager\""
}
],
"id": 11343,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28853,
"src": "7625:9:33",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 11345,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7625:27:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"argumentTypes": null,
"id": 11341,
"name": "controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 172,
"src": "7602:10:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IController_$148",
"typeString": "contract IController"
}
},
"id": 11342,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getContract",
"nodeType": "MemberAccess",
"referencedDeclaration": 147,
"src": "7602:22:33",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32) view external returns (address)"
}
},
"id": 11346,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7602:51:33",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 11340,
"name": "IBondingManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3936,
"src": "7586:15:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IBondingManager_$3936_$",
"typeString": "type(contract IBondingManager)"
}
},
"id": 11347,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7586:68:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IBondingManager_$3936",
"typeString": "contract IBondingManager"
}
},
"functionReturnParameters": 11339,
"id": 11348,
"nodeType": "Return",
"src": "7579:75:33"
}
]
},
"documentation": "@dev Return BondingManager interface",
"id": 11350,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "bondingManager",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11336,
"nodeType": "ParameterList",
"parameters": [],
"src": "7526:2:33"
},
"returnParameters": {
"id": 11339,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11338,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11350,
"src": "7552:15:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IBondingManager_$3936",
"typeString": "contract IBondingManager"
},
"typeName": {
"contractScope": null,
"id": 11337,
"name": "IBondingManager",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3936,
"src": "7552:15:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IBondingManager_$3936",
"typeString": "contract IBondingManager"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7551:17:33"
},
"scope": 11366,
"src": "7503:158:33",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 11364,
"nodeType": "Block",
"src": "7769:76:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "4d696e746572",
"id": 11359,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7827:8:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6e58ad548d72b425ea94c15f453bf26caddb061d82b2551db7fdd3cefe0e9940",
"typeString": "literal_string \"Minter\""
},
"value": "Minter"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_6e58ad548d72b425ea94c15f453bf26caddb061d82b2551db7fdd3cefe0e9940",
"typeString": "literal_string \"Minter\""
}
],
"id": 11358,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28853,
"src": "7817:9:33",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 11360,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7817:19:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"argumentTypes": null,
"id": 11356,
"name": "controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 172,
"src": "7794:10:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IController_$148",
"typeString": "contract IController"
}
},
"id": 11357,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getContract",
"nodeType": "MemberAccess",
"referencedDeclaration": 147,
"src": "7794:22:33",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32) view external returns (address)"
}
},
"id": 11361,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7794:43:33",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 11355,
"name": "IMinter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27164,
"src": "7786:7:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IMinter_$27164_$",
"typeString": "type(contract IMinter)"
}
},
"id": 11362,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7786:52:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IMinter_$27164",
"typeString": "contract IMinter"
}
},
"functionReturnParameters": 11354,
"id": 11363,
"nodeType": "Return",
"src": "7779:59:33"
}
]
},
"documentation": "@dev Return Minter interface",
"id": 11365,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "minter",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11351,
"nodeType": "ParameterList",
"parameters": [],
"src": "7734:2:33"
},
"returnParameters": {
"id": 11354,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11353,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11365,
"src": "7760:7:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IMinter_$27164",
"typeString": "contract IMinter"
},
"typeName": {
"contractScope": null,
"id": 11352,
"name": "IMinter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 27164,
"src": "7760:7:33",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IMinter_$27164",
"typeString": "contract IMinter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7759:9:33"
},
"scope": 11366,
"src": "7719:126:33",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 11367,
"src": "404:7443:33"
}
],
"src": "0:7848:33"
},
"compiler": {
"name": "solc",
"version": "0.5.11+commit.22be8592.Linux.g++"
},
"networks": {},
"schemaVersion": "3.2.2",
"updatedAt": "2020-09-23T19:46:20.491Z",
"devdoc": {
"methods": {
"blockHashForRound(uint256)": {
"params": {
"_round": "Round number"
},
"return": "Blockhash for `_round`"
},
"constructor": {
"details": "This constructor will not initialize any state variables besides `controller`. The following setter functions should be used to initialize state variables post-deployment: - setRoundLength() - setRoundLockAmount()",
"params": {
"_controller": "Address of Controller that this contract will be registered with"
}
},
"setController(address)": {
"params": {
"_controller": "Controller contract address"
}
},
"setLIPUpgradeRound(uint256,uint256)": {
"params": {
"_lip": "the LIP number.",
"_round": "(optional) the round in which the LIP becomes active"
}
},
"setRoundLength(uint256)": {
"params": {
"_roundLength": "Round length in blocks"
}
},
"setRoundLockAmount(uint256)": {
"params": {
"_roundLockAmount": "Round lock amount as a % of the number of blocks in a round"
}
}
},
"title": "RoundsManager"
},
"userdoc": {
"methods": {
"blockHash(uint256)": {
"notice": "Return blockhash for a block"
},
"blockHashForRound(uint256)": {
"notice": "Return blockhash for a round"
},
"blockNum()": {
"notice": "Return current block number"
},
"constructor": "RoundsManager constructor. Only invokes constructor of base Manager contract with provided Controller address",
"currentRound()": {
"notice": "Return current round"
},
"currentRoundInitialized()": {
"notice": "Check if current round is initialized"
},
"currentRoundLocked()": {
"notice": "Check if we are in the lock period of the current round"
},
"currentRoundStartBlock()": {
"notice": "Return start block of current round"
},
"initializeRound()": {
"notice": "Initialize the current round. Called once at the start of any round"
},
"setController(address)": {
"notice": "Set controller. Only callable by current controller"
},
"setLIPUpgradeRound(uint256,uint256)": {
"notice": "setLIPUpgradeRound sets the round an LIP upgrade would become active."
},
"setRoundLength(uint256)": {
"notice": "Set round length. Only callable by the controller owner"
},
"setRoundLockAmount(uint256)": {
"notice": "Set round lock amount. Only callable by the controller owner"
}
},
"notice": "Manages round progression and other blockchain time related operations of the Livepeer protocol"
}
}